hot module replacement dont work with absolute publicPath
See original GitHub issuewhen hot updating the plugin takes the current protocol + host + port + publicPath + outputFilename
https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/blob/master/hotModuleReplacement.js#L3
https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/blob/master/hotModuleReplacement.js#L4
so the check in https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/blob/master/hotModuleReplacement.js#L13
oldChunk === newChunk
is always false:
oldChunk = http://localhost:3011/dist/assets/Login
newChunk = http://localhost:3010http://localhost:3011/dist/assets/Login
when i comment out the origin
it works
there could be a check for if the publicPath
is an absolute one and just add the origin
if its not
should i send i pr for this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Webpack-dev-server HMR not work when i add publicpath in ...
Just like title, when I add publicPath property in output, the HMR(Hot module replacement) not work, and when I remove it, It can...
Read more >Public Path - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Hot Module Replacement - SymfonyCasts
It's not working! Webpack, AJAX and publicPath. Go to your browser's console, click the gear icon and check "Preserve logs". Thanks ...
Read more >Webpack 5 Full Project Setup - YouTube
React Fast Refresh in Webpack: the new hot module loading tool supported ... I make to set environment variables will not work on...
Read more >Webpack, Hot Module Replacement and the public path
But it does not work with HMR. It took me the good part of an afternoon to find out that Hot module replacement...
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
yes looks like it would fix my issue but looks like if
publicPath.match(/https?:/g)
is false you lost thepublicPath
? i left a comment at https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/pull/24/commits/c86dfac9e31dfaba00611e5bae362fe7633fc593 thank you@phyllisstein PR fixing this and related issues has been merged.
yarn upgrade extract-css-chunks-webpack-plugin
. Thanks again @phyllisstein !!