generated from chiffre-io/template-library
-
-
Notifications
You must be signed in to change notification settings - Fork 239
Closed as not planned
Labels
wontfixThis will not be worked onThis will not be worked on
Description
Context
What's your version of nuqs?
2.3.2
What framework are you using?
- ✅ Next.js (app router)
- ✅ MUI with Pigment CSS
Which version of your framework are you using?
Not relevant, problem is within Pigment CSS/wyw-in-js
Description
During static analysis the Pigment CSS goes through all the files that are at some point imported within the app. It can be overcome by setting asyncResolve property in pigment config in next.config.js like this:
asyncResolve: (what) => {
if (what.includes("nuqs")) {
return import.meta.resolve(what).replace("file://", "");
}
return null;
},Although it's not nuqs issue per se, it can be easily fixed until Pigment CSS team implements ESM imports. I don't really know how to report this to Pigment CSS, so if someone could create issue there, it would be awesome.
Reproduction
https://stackblitz.com/edit/github-qz9evuvr?file=src%2Fapp%2Fpage.tsx
Throws with:
⨯ unhandledRejection: Error: This package is ESM only.
See https://err.47ng.com/NUQS-101 for more details. in/home/projects/bnmiozlkmw.github/node_modules/nuqs/esm-only.cjs
franky47
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on