router - Demo routing localized app paths
huntharo opened this issue · 0 comments
huntharo commented
To-Do
- Update
edge-to-origin
to allow a list of locale prefix directories - router-lib - Strip the locale prefix before looking up the appname and version
- router-lib - Strip the locale prefix on
/_next/data/0.7.0/en/nextjs-demo/posts/ssg-ssr.json?id=ssg-ssr
- Add a CloudFront behavior for
/sv/
manually to start testing - Update CDK constructs to create either
*
locale route or list of locale routes - Add/update tests as necessary
- Manually test the nextjs-demo app with localization
Notes
- This is not the same as the
prefix
functionalityprefix
applies to everything: static files, api routes,_next/data
, pages, everythinglocales
only apply to page paths
- Example paths with locales for app without
basePath
set- Page:
/sv/nextjs-demo
_next/data
:/_next/data/development/sv/nextjs-demo/post
- Images:
/nextjs-demo/0.0.0/images/profile.jpg
- Manifest:
/nextjs-demo/0.0.0/_next/static/development/_buildManifest.js
- Page JS Chunk:
/nextjs-demo/0.0.0/_next/static/chunks/pages/nextjs-demo/posts/%5Bid%5D.js
- Page:
- CloudFront Behavior Implications:
- Only 1 new
/*/[something]
route needs to be added for Pages
- Only 1 new