To fix Sass Loader Error: Invalid options object that does not match the API schema with JavaScript, we make sure the Webpack config has properties in the right places.
For instance, we write
module.exports = {
loader: "sass-loader",
options: {
sassOptions: {
indentedSyntax: true,
},
},
};
in webpack.config.js, to add the indentedSyntax
property into sassOptions
.