extract-css-chunks-webpack-plugin
extract-css-chunks-webpack-plugin copied to clipboard
Do not add style as body link if it already exists
When a stylesheet link already exists in the head and preload is supported the stylesheet is added twice.
This is also mentioned in https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/pull/300#issuecomment-752047229
This PR prevent the link from being added to the body if it already is loaded.
@ScriptedAlchemy can we get this merged in and released?
Lighthouse penalizes this fairly heavily:
@ScriptedAlchemy, big request, merge and publish the fix, if you will have at least a little time
ooh man thx!
I have tested this and it is working well. The problem I had was because I hadn't set the publicPath in for the build, but now it works!
I can confirm that this PR fix the problem, but at this point I don't expect to be merged any time soon, my solution was to use patch-package to apply the fix direct to the node_modules/extract-css-chunks-webpack-plugin/dist/index.js file
If you are using [email protected] just create this file on the patches folder and follow the "Set-up" instruction on patch-package page.
Sorry <3 its been a while hehe
released