-
Notifications
You must be signed in to change notification settings - Fork 5
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
Does not rewrite html file contents on webpack watch/change :( #6
Comments
Appears to be because you clear the modules after you process them? https://github.com/skozin/webpack-path-rewriter/blob/master/es6/index.js#L357 |
No, that's because the loader doesn't get invoked unless you change the file it is rewriting. This is how Webpack currently works. So, when you change some other file, the hashes become different, but Since this module consists of not only loader, but also a plugin, it might be possible to auto-update the target file, but I'm not sure (and have no time to experiment with this now). For now, the best strategy is to disable hashing during development. Eventually, this will be covered by examples in this repo, but until that you can find an example here. That setup supports hashing in production mode, source maps, livereload and hot stylesheets replacement. Another thing that you may want to enable in development is the |
hmm - disabling hashing in dev sounds like a good idea. i'll try that and see if the whole thing works with that in place |
BTW, removing the line you linked in the previous comment might do the trick, but this will require some other changes in the logic of both loader and plugin, and a fair amount of testing. I'm not sure that it will not break something else) |
If you change any source file while webpack is running, the plugin does not rewrite the paths in the built html file. You have to stop and re-run webpack.
The text was updated successfully, but these errors were encountered: