Closed laem closed 2 days ago
I suppose I'm doing something wrong because it seems to work with the Stackblitz demo.
Selector "h1" is not pure (pure selectors must contain at least one local class or id)
is an error from next.js (postcss-modules-local-by-default) but the code you showed should definitely work
I believe it is cause by this problem: https://github.com/css-modules/postcss-modules-local-by-default/issues/65
next.js is still using an old version of postcss-modules-local-by-default: https://github.com/vercel/next.js/pull/72622
but there is a workaround as described in the readme:
For now Next.js supports nesting only with the postcss-nested plugin. Therefore you have to create a postcss.config.js file in your project root:
// postcss.config.js
module.exports = {
plugins: {
"postcss-nested": {},
},
};
Thanks ! I'm running the migration here https://github.com/cartesapp/cartes/pull/704 Some routes work in dev, some others don't. I'll investigate :)
Looks like it solved the problem, thanks !
In my @cartesapp I make heavy use of styled-components to wrap multiple element styled in one component only.
Just tried converting my codebase to yak, I got this error :
Is this a limitation when using Yak ? In this case, I believe it should be noted on the README as a big limitation when migrating.
This is the file in question :