-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nuqs/server
requires react
#804
Comments
Yeah unfortunately the Since it's a breaking change, it's unlikely to happen soon though, but we could do it the other way around: provide imports for individual server-side features, like: import { createSerializer } from 'nuqs/server/serializer'
import { parseAsStringLiteral } from 'nuqs/server/parsers' What do you think? |
That would be perfect for my use-case! |
That solution I proposed has been implemented in #805, could you give it a go and let me know if it works please?
Note: those imports are temporary until v3 lands (no date planned at the moment). In v3, the cache will have been moved to it's own import ( |
@boredland I tested the imports and I'm seeing some issues with TypeScript not resolving the contents of |
Thank you for the super quick implementation! I didn't yet have the chance to test before my Christmas break, but will surely do it as the first thing next year! |
Context
What's your version of
nuqs
?What framework are you using?
Which version of your framework are you using?
Description
Apart from Frontend usage, I wanted to use my nuqs parsers to generate URLs on the server-side to be sent in emails.
For that I am trying to use a serializer on an API Route like so:
But sadly my Next.js-build fails, telling me:
Is there a trick to it? As I see it, this module is required for the cache feature, that I don't need. Would splitting up the path to allow direct imports of parsers/serializer help?
The text was updated successfully, but these errors were encountered: