Some CSS styles not being applied correctly after webpack build
clickwithclark opened this issue ยท 2 comments
Current behaviour ๐ฃ
Some CSS styles may not be applying properly
Expected behaviour โ๏ธ
All CSS styles to work properly at all times
Reproduction Example ๐พ
I am very new to webpack but I have noticed that some of my CSS was not being applied unless I specifically set the minify property to false. It took me many hours to determine this and I am not yet certain if it was my improper use of the CSS loaders or not but I would still like to report it here for other users to be able to have a fix on demand.
Environment ๐ฅ
Node.js v14.15.5
win32 10.0.19043
npm 7.24.1
โโโฌ clean-webpack-plugin@4.0.0
โ โโโ webpack@5.56.0 deduped
โโโฌ css-loader@6.3.0
โ โโโ webpack@5.56.0 deduped
โโโฌ css-minimizer-webpack-plugin@3.0.2
โ โโโ webpack@5.56.0 deduped
โโโฌ html-loader@2.1.2
โ โโโ webpack@5.56.0 deduped
โโโฌ html-webpack-plugin@5.3.2
โ โโโ webpack@5.56.0 deduped
โโโฌ mini-css-extract-plugin@2.3.0
โ โโโ webpack@5.56.0 deduped
โโโฌ sass-loader@12.1.0
โ โโโ webpack@5.56.0 deduped
โโโฌ style-loader@3.3.0
โ โโโ webpack@5.56.0 deduped
โโโฌ url-loader@4.1.1 #not being used i am using the 'asset/resource' method instead
โ โโโฌ file-loader@6.2.0 #not being used i am using the 'asset/resource' method instead
โ โ โโโ webpack@5.56.0 deduped
โ โโโ webpack@5.56.0 deduped
โโโฌ webpack-cli@4.8.0
โ โโโฌ @webpack-cli/configtest@1.0.4
โ โ โโโ webpack@5.56.0 deduped
โ โโโ webpack@5.56.0 deduped
โโโฌ webpack-dev-middleware@5.2.1
โ โโโ webpack@5.56.0 deduped
โโโฌ webpack-dev-server@4.3.0
โ โโโ webpack@5.56.0 deduped
โโโฌ webpack@5.56.0
โ โโโฌ terser-webpack-plugin@5.2.4
โ โโโ webpack@5.56.0 deduped
โโโฌ workbox-webpack-plugin@6.3.0
โโโ webpack@5.56.0 deduped
html-webpack-plugin@5.3.2
plugins: [
new HtmlWebpackPlugin({
filename: './index.html',
template: './template.html',
minify: false, //<- for styles to work
}),
Minify:true /or unset
Here you see most styles loading but for some reason, not the styles concerned with the input field.
Minify:false
Here all the styles are being applied correctly
If I can reproduce this bug better I will update but for now I am hoping the title at lease can help someone else, It took me forever!
Thanks for opening this issue - it's hard to tell anything without a reproduction..
Minification is done by html-minifier-terser
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days.