insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Other
5.57k stars 335 forks source link

postcss version #374

Open jvega opened 6 years ago

jvega commented 6 years ago

This issue is a:

when run yarn start this message appears shortly

Your current PostCSS version is 5.2.17, but postcss-modules-scope uses 6.0.6. Perhaps this is the source of the error below

and I get this error

Module build failed: Error: composition is only allowed when selector is single :local class name not in ".someName", ".someName" is weird

so all the stylesheets that use compose (from css-modules) are broken

nwb version: v0.18.10 node version: v6.11.1

insin commented 6 years ago

It looks like css-loader's postcss-modules-scope dependency updated the major version of postcss it relies on in a minor release:

https://unpkg.com/postcss-modules-scope@1.0.2/package.json https://unpkg.com/postcss-modules-scope@1.1.0/package.json

css-loader has an issue for updating to PostCSS 6, but as per that issue it's also being completely rewritten, so not sure of the appropriate fix for this, or when css-loader changes will land.

jvega commented 6 years ago

well, until cssnano gets updated, using explicit :local solve the error