2

I'm trying to use sass package instead of node-sass in Nuxt.js. I found a config like this;

// vue.config.js
module.exports = {
  css: {
    loaderOptions: {
      sass: {
        implementation: require('sass'), // This line must in sass option
      },
    },
  }
}

but I couldn't figure out where to put this code in Nuxt.js.

1 Answers1

5

Its already pointed on documentation.

nuxt.config.js:

build: {

  ...

  loaders: {
    sass: {
      implementation: require('sass')
    },
    scss: {
      implementation: require('sass')
    }
  }

  ...

}
Meyti
  • 88
  • 1
  • 5
  • 1
    You saved my day! I have a monorepo where node-sass and sass are installed and webpack seems to use node-sass as a default. – Flosut Mözil Dec 17 '21 at 12:06