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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets refreshing not working with html-webpack-plugin v4 #175

Open
weareoutman opened this issue Apr 10, 2020 · 2 comments
Open

Assets refreshing not working with html-webpack-plugin v4 #175

weareoutman opened this issue Apr 10, 2020 · 2 comments

Comments

@weareoutman
Copy link

weareoutman commented Apr 10, 2020

Hi, thanks for the great work of this plugin.

It seems not working well with html-webpack-plugin v4. The compilation missing to refresh assets after assets updated.

I created a repo which can reproduce the bug. Hope it will help.

Reproducing steps:

  1. Run npm start
  2. Update assets/dll.js
  3. Watch the webpack log, it does re-compile, but no assets updated.
  4. Open the dist/dll.js, it's stale. (the devServer.writeToDisk option is just for convenience of debugging)

More info:

When webpack first started, the assets do be added:

Version: webpack 4.42.1
Time: 334ms
Built at: 04/10/2020 10:18:50 PM
          Asset       Size  Chunks             Chunk Names
         dll.js   19 bytes          [emitted]  
     index.html  263 bytes          [emitted]  
index_bundle.js    360 KiB    main  [emitted]  main
Entrypoint main = index_bundle.js

But when assets file updated, the re-compilation missed the assets.

ℹ 「wdm」: Compiling...
ℹ 「wdm」: Hash: a7a08df7cdac9b2219d8
Version: webpack 4.42.1
Time: 10ms
Built at: 04/10/2020 10:19:01 PM
 1 asset
Entrypoint main = index_bundle.js
   33 modules
ℹ 「wdm」: Compiled successfully.

And when I downgrade the html-webpack-plugin to v3, it works again.

@xhavit
Copy link

xhavit commented May 13, 2020

@weareoutman I'm having the same problem and looking forward to solving it.

@weareoutman
Copy link
Author

For those who having the same problem, I have switched to html-webpack-tags-plugin which works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants