Struggling to get mini-css-extract-plugin working for both .css and .scss files in Webpack 5

This page summarizes the projects mentioned and recommended in the original post on /r/learnjavascript

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • webpack-merge

    Merge designed for webpack

  • I'm using Webpack 5 with webpack-merge so I can have separate config files for prod and dev with a common file for settings that both prod and dev share.

  • mini-css-extract-plugin

    Lightweight CSS extraction plugin

  • In my production file I'm using mini-css-extract-plugin to create a final css file rather than have them loaded in my bundle.js file.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • mortgageCalc

  • Does anyone know what I'm doing wrong here? It's only a small thing but it's annoying me that it isn't working as expected and not all of the CSS in my final file is minified. Here is the git repo if that helps.

  • css-minimizer-webpack-plugin

    cssnano plugin for Webpack

  • I did actually get it working in the end using css-minimizer-webpack-plugin but your solution is much better since it saves adding an extra rule to my webpack config file and saves me an extra npm package install too.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: Jampack – Optimizes static websites as a post-processing step

    3 projects | news.ycombinator.com | 25 Mar 2024
  • Optimize CSS with SAT Solving

    5 projects | news.ycombinator.com | 17 Mar 2024
  • Critical CSS and Next.js App Directory

    1 project | /r/nextjs | 26 Nov 2023
  • A webpack.config.js for WordPress Projects

    6 projects | dev.to | 31 Jul 2023
  • Remove CSS Styles and Apply Styles to All Elements

    1 project | /r/css | 7 May 2023