NuqsAdapter breaks CSS layer order #966
-
I am using nuqs 2.4.1 in a Next 14.2.25 app. I am applying a custom layer order in my main layout file ( I am quite confused who NuqsAdapter could interfer since nuqs is not related to UI/CSS. Would anyone know more? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Wow, that is wild. Indeed, the adapter is only a React Context provider, so it should have no effect on styles. Would you be able to open an issue with a minimal reproduction please? |
Beta Was this translation helpful? Give feedback.
Thanks, I tried your repro and the issue occurs just by importing the adapter, not even by including it in the React tree:
That could suggest a bundler issue, or a CJS/ESM incompatibility issue with Mantine, but at least it rules out the context provider as the source of the issue.
Edit: if I remove the "use client" directive in
nuqs/adapters/next/app
, the problem also goes away. So definitely hinting towards the bundling issue, maybe this is something that we could escalate to the Next.js team.Edit: yeah definitely a "use client" directive issue. If I completely remove nuqs, the simple fact of importing this file in the root layout causes the issue:
// sr…