Mini-css-extract-plugin: Extracting SCSS to export uncompiled SCSS

Created on 23 Nov 2019  路  1Comment  路  Source: webpack-contrib/mini-css-extract-plugin

Hello there,

I'm wondering if there is an option to extract and combine LESS files from my multiple components into one uncompiled LESS file?

Question: Why do you need to do that?
Answer: I'm building a React component library and would like to keep variables and mixins untouched. After importing the library into a project, I would like to import one LESS file and override variable values with !default.

Thanks!

Ugo

Most helpful comment

Webpack module and plugins

module: {
    rules: [           
      {
        test: /\.s?[ac]ss$/,
        use: [
            MiniCssExtractPlugin.loader,
            { loader: 'css-loader', options: { url: false, sourceMap: true } },
            { loader: 'sass-loader', options: { sourceMap: true } }
        ],
      },
    ]
  },
  plugins: [
    new MiniCssExtractPlugin({
        filename: "style.scss"
    })
  ],

>All comments

Webpack module and plugins

module: {
    rules: [           
      {
        test: /\.s?[ac]ss$/,
        use: [
            MiniCssExtractPlugin.loader,
            { loader: 'css-loader', options: { url: false, sourceMap: true } },
            { loader: 'sass-loader', options: { sourceMap: true } }
        ],
      },
    ]
  },
  plugins: [
    new MiniCssExtractPlugin({
        filename: "style.scss"
    })
  ],
Was this page helpful?
0 / 5 - 0 ratings

Related issues

YanYuanFE picture YanYuanFE  路  3Comments

Legends picture Legends  路  4Comments

septs picture septs  路  3Comments

skrobek picture skrobek  路  4Comments

IdeaHunter picture IdeaHunter  路  3Comments