-
Notifications
You must be signed in to change notification settings - Fork 231
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
Support Next.js v8 #274
Comments
@timneutkens would you consider this a Next.js v8 bug? Side note; you can ship ESM and CJS side by side using |
This is still on my list of things to fix on the Next.js side. However next-routes is importing next/link inside the custom server, which is slightly weird/wrong anyway. |
Because next-routes requires APIs outside of compilation we have to compile these Fixes fridays/next-routes#274 Fixes #6017
this issue was fixed by 8.0.0-canary.7 (: i validated. |
thank @EduardoHidalgo you have saved my day.. |
Thank you! Yeah Link in the custom server doesn't make sense, it's not used there at all, it's just in the same file. PR welcome |
Can this be closed since it works in 8? |
Yes 😀 |
next-routes
imports fromnext/link
:https://github.com/fridays/next-routes/blob/1.4.2/src/index.js#L4
But in Next.js v8.0.0-canary.3 that file contains ESM, presumably because Next.js expects it will always be imported within a Next.js project via a Webpack build:
https://unpkg.com/next@8.0.0-canary.3/dist/client/link.js
That causes this runtime error on the server:
Presumably
import NextRouter from 'next/router'
would have the same issue.The text was updated successfully, but these errors were encountered: