I have just created the standard tutorial nuxt.js app
Referencing a central .scss-File in nuxt.config.js is not a problem (a few simple styles contained show effect, so it truly is working).
...
css: ['~/assets/scss/main.scss'],
scss: {},
sass: {},
plugins: [],
...
Referencing a main2.sass file however...
css: ['~/assets/scss/main2.sass'],
...gets me trouble:
main2.sass
h1.title
background: yellow
color: white !important
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema. - options has an unknown property 'indentedSyntax'. These properties are valid:
Worth noting: I did not add a indentedSyntax property yet!
I then tried doing so, inside the sass-array, and also inside a nested inner sassOptions...
sass: {
sassOptions: {
indentedSyntax: true
}
},
But all no luck. – Do I need to stuff that somehow into webpack options (within nuxt.config.js) for webpack (under nuxt's hood) to realize?
full error message in console:
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.
- options has an unknown property 'indentedSyntax'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }
at validate (/depot/sandbox/node_modules/schema-utils/dist/validate.js:49:11)
at Object.loader (/depot/sandbox/node_modules/sass-loader/dist/index.js:36:28)
@ ./assets/scss/main2.sass 4:14-225 14:3-18:5 15:22-233
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js
update
Also this (after some extensive github searching) syntax is not helping:
css: [
'~/assets/scss/main.scss',
{ src: '~/assets/scss/main2.sass', lang: 'sass' }
],