live reload broken (duplicate scripts like vendor.js appear)
See original GitHub issueReproduction: https://github.com/jacobq/embroider-live-reload-bug-repro
Enabling embroider in minimal (ember-cli v4.2.0) app breaks live reload feature. When ember s
first gets run things are OK. However, changing a file (triggering update/reload) causes something weird to happen such that multiple vendor.js
scripts appear (one gets added after each change/reload).
Compare link for v1.6.0 vs v1.7.1 (known good / bad): https://github.com/embroider-build/embroider/compare/v1.6.0...v1.7.1
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
HMR/Live Reloading broken after Webpack 5 rc.0 -> rc.1 update
Seems this issue happens when you have a browserslist entry in your package. json . Modules from ./node_modules/webpack-dev-server/client/ are ...
Read more >Webpack devServer v. 4.x.x live reload not working
Below is the result of running the npm start script (the 2 files in ./src, index.js and the print.js, are copied from the...
Read more >Why webpack-dev-server Live-Reload Is Not Working - Medium
When I modify javascript files, I have to manually run Webpack CLI to see changes to bundle.js in the local filesystem, and bundle.js...
Read more >Handling common JavaScript problems - MDN Web Docs
For a start, the JavaScript console will report errors in your code. Make a local copy of our broken-ajax.html example (see the source...
Read more >Code Splitting - webpack
Let's take a look at how we might split another module from the main bundle: project ... src/index.js and will thus be duplicated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m taking a look at this, thank you for the reproduction.
I think I figured it out: when we cache/reuse the
webpack
instance (i.e.this.lastWebpack
) we do not pass it the newly createdHTMLEntrypoint
s (inappInfo
), so the JSDOM instances held by the existing/previous webpack instance are getting used again (keeping the previously inserted content and then adding it again). TheequalAppInfo
doesn’t inspect the state of the entrypoints’ JSDOM instances