in VueJS by
Can I use CSS modules for preprocessors?

1 Answer

0 votes
by

Yes, you can use preprocessors with CSS Modules.

For example, sass-loader can configured in webpack file for sass preprocessor.

// webpack.config.js -> module.rules
{
  test: /\.scss$/,
  use: [
    'vue-style-loader',
    {
      loader: 'css-loader',
      options: { modules: true }
    },
    'sass-loader'
  ]
}
...