extract-css-chunks-webpack-plugin
extract-css-chunks-webpack-plugin copied to clipboard
Plugin is always preloading and appending to body despite having linkstyles already in HTML
Hi,
I am using the newest version of the Plugin + Webpack4.
Since the preload feature was added, it always adds the style tags to the body despite having them already in the HTML. In my opinion it should not add the preload tags if the stylesheets are already added to the HTML.
https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/blob/master/src/index.js#L390
I think it is a bug, as I don't see any reason of adding the same stylesheet twice.
BR, Kevin
I have the same problem。This plugin add A stylesheet before B stylesheet in head element but add B stylesheet before A stylesheet in body
I think it is a criticle bug
By the way , I`m using nuxtjs and extractCSS set true
https://n3.map.pg0.cn/T1ZbZLBvZT1RCvBVdK
It seems to cause bugs when use import('./my-module.js')
. (./my-module.js
includes some .css
requires.)
It v4.7.5, js module will be execute after css child dependencies will be fully loaded. But in v4.8, it's seems that css child dependencies and js module will be loaded in parallel.
In parent ./my-module.js
module, it has some logic like getComputedStyle()
.
It fails to get correct style.
v4.7.5 -> v4.8 seems cause a breaking changes.
I will try to create a minimal problem reproduction repo like for you to debug.
👀 https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/pull/307
Same problem here. Stylesheet links get appended both to head and body
Same issue. Is author support this plugin yet?
Fixed in version 4.10.0