Reputation: 2129
I started a project with preact-cli
with the default template. I installed node-sass
and sass-loader
. I changed one of the .css
file to .scss
then the whle thing breaks and gives this error.
✖ ERROR BabelEsmPlugin: ./routes/profile/style.scss (../node_modules/preact-cli/lib/lib/webpack/proxy-loader.js??ref--6-0!./routes/profile/style.scss)
Module build failed (from ../node_modules/preact-cli/lib/lib/webpack/proxy-loader.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 'includePaths'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }
at validate (./routes/profile/index.js
@ ./routes/profile/index.js
@ ./components/app.js
@ ./index.js
@ ../node_modules/preact-cli/lib/lib/entry.js
@ multi ../node_modules/webpack-dev-server/client?http://0.0.0.0:8080 ../node_modules/webpack/hot/dev-server.js ../node_modules/preact-cli/lib/lib/entry webpack-dev-server/client webpack/hot/dev-server
Upvotes: 2
Views: 2561
Reputation: 128
This error is for the sass-loader version 8 you should use
yarn add -D [email protected]
(or with npm)
npm add --save-dev [email protected]
source from https://github.com/preactjs/preact-cli/issues/880
If you use sass loader options maybe this quick fix could help (its waiting the merge) https://github.com/preactjs/preact-cli/pull/930
Hope this help you.
Upvotes: 5