Use WebpackChain to configure import scss with globs (gridsome or vue-cli)

488 Views Asked by At

I have a gridsome project that use webpackchain to configure webpack (just like vue-cli does). I'd like to install scss glob management in my scss files. I use import-glob-loader I'm not very familiar to webpack, and the webpackchain syntax confuses me a little.

I tried something like :

module.exports = {
  //  ...
  chainWebpack: config => {
    config.module
    .rule('scss')
    .test(/\.scss/)
    .use('import-glob-loader')
      .loader('import-glob-loader')
  }
}

And some other syntaxes from what I've found in some docs, but none is working...

Any clue here could help me understand, thanks for your help !

0

There are 0 best solutions below