You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I upgraded my project from webpack 4 to webpack 5, along with updating css-loader from version 0.28.11 to 6.8.1. In webpack version 5, the minimize option was removed in favor of using MiniCssExtractPlugin, CssMinimizerPlugin, and HTMLWebpackPlugin to inject styles into the HTML file.
However, my use case involves building only a JavaScript file and then uploading it to a CDN. From this CDN, the JavaScript file is injected into another React app. In this scenario, I need the CSS to be minimized within the JavaScript chunk itself.
Despite spending several days on this, I haven't been able to find a solution.
Issue Description:
Recently, I upgraded my project from webpack 4 to webpack 5, along with updating css-loader from version 0.28.11 to 6.8.1. In webpack version 5, the minimize option was removed in favor of using MiniCssExtractPlugin, CssMinimizerPlugin, and HTMLWebpackPlugin to inject styles into the HTML file.
However, my use case involves building only a JavaScript file and then uploading it to a CDN. From this CDN, the JavaScript file is injected into another React app. In this scenario, I need the CSS to be minimized within the JavaScript chunk itself.
Despite spending several days on this, I haven't been able to find a solution.
webpack config
index.js
styles.css
versions
I am getting this bundle.js file where white space isn't removed
The text was updated successfully, but these errors were encountered: