Preact-cli: sass-loader 8 incompatiblity

Created on 1 Sep 2019  ยท  6Comments  ยท  Source: preactjs/preact-cli

Do you want to request a _feature_ or report a _bug_? Bug

What is the current behaviour?
Installing sass-loader results in the latest version (8.0.0) from NPM.
then running npm run start which runs preact cli tools then fails with the following error

โœ– ERROR ./node_modules/preact-cli/lib/lib/webpack/proxy-loader.js??ref--2-0!./src/components/formInput/style.scss
Module build failed: 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 (/mnt./src/routes/category/index.js
 @ ./src/routes/category/index.js
 @ ./src/components/app.js
 @ ./src/index.js
 @ ./node_modules/preact-cli/lib/lib/entry.js
 @ multi ./node_modules/preact-cli/lib/lib/entry webpack-dev-server/client webpack/hot/dev-server

Note this hit vue at the same time https://github.com/vuejs/vue-cli/issues/4513

If the current behaviour is a bug, please provide the steps to reproduce.
Create a new preact project, the demo with a header is fine.
npm install [email protected] node-sass
Rename the existing css file to a .scss file in one of the components.
npm run start

What is the expected behaviour?
Runs as usual, it works with [email protected] but not 8.0.0

If this is a feature request, what is motivation or use case for changing the behaviour?
sass-loader seems to be officially listed in the documentation, maintaining support would be pleasant.

Please mention other relevant information.

Please paste the results of preact info here.

> preact info

         โ–„โ–„ 
     โ–„โ–„โ–“โ–“โ–“โ–“โ–“โ–“โ–„โ–„
  โ–„โ–ˆโ–€โ–€โ–ˆโ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–€โ–€โ–ˆโ–„โ–„
โ–โ–“โ–Œโ–โ–“โ–“โ–“โ–’โ–„ โ–€โ–„โ–„โ–“โ–“โ–“โ–Œโ–โ–“โ–Œ
โ–โ–“โ–“โ–„โ–€โ–“โ–€ โ–„โ–“โ–“โ–„โ–„โ–€โ–“โ–“ โ–“โ–“โ–Œ 
โ–โ–“โ–“โ–“โ–Œ โ–’โ–“โ–Œ  โ–โ–“โ–“  โ–“โ–“โ–“โ–Œ preact-cli 2.2.1
โ–โ–“โ–“ โ–’โ–“โ–„โ–„โ–€โ–“โ–“โ–€ โ–„โ–“โ–“ โ–“โ–“โ–Œ
โ–โ–“โ–Œโ–โ–“โ–“โ–“โ–€โ–€โ–„โ–„โ–€โ–€โ–“โ–“โ–“โ–Œโ–โ–“โ–Œ
  โ–€โ–ˆโ–„โ–„โ–’โ–“โ–“โ–“โ–“โ–“โ–“โ–’โ–„โ–„โ–’โ–€
      โ–€โ–“โ–“โ–“โ–“โ–“โ–“โ–€โ–€
         โ–€โ–€
For help with a specific command, enter:
  preact help [command]

  create [template] [dest]  Create a new application.
  build [src] [dest]        Create a production build in build/
  watch [src]               Start a development live-reload server.
  serve [dir]               Start an HTTP2 static fileserver.
  list                      List all official templates

Options:
  -h, --help  Show help                                                [boolean]

Unknown argument: info

_Is this an outdated command line option or issue template?_

Most helpful comment

+1 Downgrading to [email protected] works.

All 6 comments

Just commenting to confirm this behaviour in my project too. I'm not sure what change needs to be made here, however.

+1 Downgrading to [email protected] works.

yarn add [email protected] and now it starts.

Friendly ping - is anyone looking at this?

Any update wrt this?

Now because of Webpack 4 it's incompatible with sass-loader 11.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thangngoc89 picture thangngoc89  ยท  3Comments

ethanwu10 picture ethanwu10  ยท  3Comments

raphaelbauer picture raphaelbauer  ยท  3Comments

haggen picture haggen  ยท  3Comments

hesselbom picture hesselbom  ยท  3Comments