Skip to content

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

Merged
merged 4 commits into from
Feb 25, 2022
Merged

use parcel css #5959

merged 4 commits into from
Feb 25, 2022

Conversation

chenxsan
Copy link
Member

It's faster, and the build is smaller.

@vercel
Copy link

vercel bot commented Feb 11, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/86QMByGViG6kVRdCUyVGou4k8Jcr
✅ Preview: https://webpack-js-org-git-fork-chenxsan-feature-us-7ab454-webpack-docs.vercel.app

rishabh3112
rishabh3112 previously approved these changes Feb 21, 2022
webpack.ssg.mjs Outdated
Comment on lines 47 to 51
minimizer: [
new OptimizeCSSAssetsPlugin({
minify: OptimizeCSSAssetsPlugin.parcelCssMinify,
}),
],
Copy link
Member

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,
      }),
    ],
  },
};

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@snitin315 snitin315 merged commit c3815ed into webpack:master Feb 25, 2022
@chenxsan chenxsan deleted the feature/use-parcel-css branch February 25, 2022 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants