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 - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. 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.

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Add the SurveyJS white-label form builder to your JavaScript app (React/Angular/Vue3). Build complex JSON forms without coding. Fully customizable, works with any backend, perfect for data-heavy apps. Learn more.

    SurveyJS logo
  3. 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.

  4. 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.

  5. 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

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?