You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The beta website has a basePath (/new) for monorepo deployment, as explained in development.md.
However, it causes several issues:
some links can go to /new in production (for example somewhere in the blog)
we can't use the features of next/router
telemetry in www/pages/_app.tsx can't as it's based on the router
almost all links are broken when developing locally
So I think we should find a better solution. I have an idea but i don't know if it would work.
Couldn't we use the router with Link etc and on routeChangeStart, depending on the node environment, check if the url contains the basePath and remove it in production before pushing any url? It would be some kind of middleware.
Your idea would definitely work, but because it's not getting proxied on the "edge" it would mean that users land on the website, then bounce out to another page. This would be very slow for the end user.
I would love to have a better set up than what we currently have. Potentially we could remove the /new now (since we have migrated most content over), then only have redirects if the route is prefixed by /docs. This will need testing, so I can leave this open for discussion/implementation
Activity
kiwicopple commentedon May 18, 2021
Hey @florian-lefebvre - thanks for opening this. The current setup is definitely frustrating. We're using this set up:
https://vercel.com/blog/monorepos
Your idea would definitely work, but because it's not getting proxied on the "edge" it would mean that users land on the website, then bounce out to another page. This would be very slow for the end user.
I would love to have a better set up than what we currently have. Potentially we could remove the
/newnow (since we have migrated most content over), then only have redirects if the route is prefixed by/docs. This will need testing, so I can leave this open for discussion/implementationflorian-lefebvre commentedon May 18, 2021
I'll made a pull request for that
inian commentedon Nov 1, 2021
we moved to a new setup today which fixes this issue
docs(dart): storage buckets, streaming/cache-purge, web3, OAuth grant…