0

In my webpack config file I have this line which I can't understand what it means and how to understand or debug it.

{
        test: /\.(scss|css)$/,
        use: isProd
          ? ExtractTextPlugin.extract({
              use: 'css-loader!sass-loader?minimize',
              fallback: 'vue-style-loader',
            })
          : ['vue-style-loader', 'css-loader', 'sass-loader'],
 },

In this the line use: 'css-loader!sass-loader?minimize' What does ! and ? mean here. I have read similar syntax but unable to recognize it. Can you tell me what it means and some links where I can read in depth about it?

Saras Arya
  • 3,022
  • 8
  • 41
  • 71

1 Answers1

1

! is separate between loaders. ? is definition options for before loader.

You can read more in https://webpack.js.org/concepts/loaders/#inline

And it's deprecated feature from webpack 1: https://webpack.js.org/guides/migrating/#chaining-loaders

Quoc-Anh Nguyen
  • 4,798
  • 1
  • 22
  • 34