Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: replaced script.js compiles only once #826

Closed
11111000000 opened this issue Feb 16, 2018 · 8 comments
Closed

bug: replaced script.js compiles only once #826

11111000000 opened this issue Feb 16, 2018 · 8 comments
Labels
馃悰 Bug Stale Inactive issues

Comments

@11111000000
Copy link

11111000000 commented Feb 16, 2018

馃 Expected Behavior

When I replace script.js, - dev server updates every time

馃槸 Current Behavior

When I replace script.js, - dev server updates only once

@11111000000 11111000000 changed the title bug: rewrited script.js - recompiled only once bug: rewrited script.js - compiles only once Feb 16, 2018
@11111000000 11111000000 changed the title bug: rewrited script.js - compiles only once bug: replaced script.js compiles only once Feb 16, 2018
@11111000000
Copy link
Author

11111000000 commented Feb 16, 2018

maybe this is related with #221 , but for our case (org mode tangle) we can't "disable" anything to avoid file replacement...

@11111000000
Copy link
Author

maybe it's related to #754 too

@mischnic
Copy link
Member

mischnic commented Feb 16, 2018

Which parcel version are you using ? How did you invoke parcel?
Is "script.js" your main script or is it imported somewhere else?
Debugging is easier, if your problem can be reproduced.

Edit:
If you really mean "replace", then it looks like #221.

@11111000000
Copy link
Author

11111000000 commented Feb 16, 2018

anyone can simply reproduce that on lastest parcel.
script.js is main script
imported scripts also not works as expected

@11111000000
Copy link
Author

11111000000 commented Feb 16, 2018

to test it I use simple Emacs Org Mode file, export it with <C-x><C-e>hh and tangle with <C-c><C-v>t:

#+HTML_HEAD: <script type="text/javascript" src="script.js"></script>
#+HTML_HEAD: <link href="style.css" rel="stylesheet">

#+BEGIN_SRC css :tangle style.css
body {
   background: black;
   color: white;
}
#+END_SRC

#+BEGIN_SRC rjsx :tangle script.js
console.log('ok1')
#+END_SRC

tangle replaces script.js and style.css , so parcel's HMR not triggered in that case.

update: webpack works as expected here!

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Feb 16, 2018

This seems to be related to #221 , i'm not sure if there is a way to prevent this as described in the other issue.
We could use polling but that has a performance penalty that's not really optimal, or watch the entire directory instead of single filepaths.

@11111000000
Copy link
Author

browserify + budo (i.e. watchify) also works

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Jan 17, 2020
@github-actions github-actions bot closed this as completed Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Bug Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

3 participants