-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
use parcel css #5959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use parcel css #5959
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/86QMByGViG6kVRdCUyVGou4k8Jcr |
webpack.ssg.mjs
Outdated
minimizer: [ | ||
new OptimizeCSSAssetsPlugin({ | ||
minify: OptimizeCSSAssetsPlugin.parcelCssMinify, | ||
}), | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the OptimizeCSSAssetsPlugin
docs
⚠️ For webpack v5 or above please use css-minimizer-webpack-plugin instead.
And the css-minimizer-webpack-plugin
recently added @parcel/css
support
module.exports = {
optimization: {
minimize: true,
minimizer: [
new CssMinimizerPlugin({
minify: CssMinimizerPlugin.parcelCssMinify,
}),
],
},
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we were already using css-minimizer-webpack-plugin
if you check the code, just old naming not removed. Doesn't mean we're still using OptimizeCSSAssetsPlugin
. Let me update the naming to avoid confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
It's faster, and the build is smaller.