You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue when using Browsersync watch/reload with simplifyify. Here is the npm script I'm using.
simplifyify js/main.js -m -d -w -o js/main.min.js
Browsersync is watching for changes to js/main.min.js and reloading at the correct time. The problem I'm seeing is that after automatic reload there doesn't seem to be any js/main.min.js file on the page. I took a look in Chrome dev tools sources and there's no such file there at all. However after reloading the page manually via the browser, the JS file is loaded correctly.
Does simplifyify modify the output file multiple times? It seems like Browsersync is picking up on the change too early if that's the case. I even tried adding a reloadDebounce to Browsersync, but the results were inconsistent - the automatic reload only worked correctly sometimes. My guess is that with a high enough value it might fix the problem, but ideally I'd like to keep the delay at 0.
Would appreciate any insight you have here. Thanks!
The text was updated successfully, but these errors were encountered:
Interesting. I've never used Browsersync, so I'm not sure what the issue here is. My hunch is that it's related to this block of code, which I added a while back as a workaround for a similar timing issue
Thanks for getting back to me so quickly. For some reason I can't duplicate the issue anymore on the current project. When I get a chance I'm going to set something up with the original problem files and see if it happens again then. Assuming it does I'll try editing that block of code you mentioned to see if it helps.
Do you happen to have an example of the previous timing issue you mentioned? Would be happy to see if that's something that can be sorted out alongside those edits. Ideally it seems like we'd want to get rid of the setTimeout since that timing could vary between machines.
First off, thanks for the great tool!
I'm having an issue when using Browsersync watch/reload with simplifyify. Here is the npm script I'm using.
simplifyify js/main.js -m -d -w -o js/main.min.js
Browsersync is watching for changes to
js/main.min.js
and reloading at the correct time. The problem I'm seeing is that after automatic reload there doesn't seem to be anyjs/main.min.js
file on the page. I took a look in Chrome dev tools sources and there's no such file there at all. However after reloading the page manually via the browser, the JS file is loaded correctly.Does simplifyify modify the output file multiple times? It seems like Browsersync is picking up on the change too early if that's the case. I even tried adding a reloadDebounce to Browsersync, but the results were inconsistent - the automatic reload only worked correctly sometimes. My guess is that with a high enough value it might fix the problem, but ideally I'd like to keep the delay at 0.
Would appreciate any insight you have here. Thanks!
The text was updated successfully, but these errors were encountered: