3

I recently upgraded my sass-loader from 8.0 to 9.0 and when I run npm run build (vue-cli-service build) I get this error

ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.- options has an unknown property 'prependData' 

The only occurence of the word prependData is in my vue.config.js:

{ //... publicPath: process.env.VUE_APP_ASSETS_PUBLIC_PATH, css: { loaderOptions: { scss: { // \/\/\/\/ here's prependData below prependData: ` @import "~@salesforce-ux/design-system/design-tokens/dist/theme-one-salesforce.default.scss"; ` } } } 

1 Answer 1

5

Change prependData in vue.config.js to additionalData.

More info in the changelog for vue-loader 9.0.0:

  • the prependData option was removed in favor the additionalData option, see docs

The vue-loader guide recommends additionalData now aswell.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for pointing out this issue. I've made a pull request with vue-loader.