Skip to content

Compatibility with Browsersync #22

Open
@mdmoreau

Description

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 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!

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions