rsnext/packages/next/server
JJ Kasper b2d1d87e7f
Add initial changes for i18n support (#17370)
This adds the initial changes outlined in the [i18n routing RFC](https://github.com/vercel/next.js/discussions/17078). This currently treats the locale prefix on routes similar to how the basePath is treated in that the config doesn't require any changes to your pages directory and is automatically stripped/added based on the detected locale that should be used. 

Currently redirecting occurs on the `/` route if a locale is detected regardless of if an optional catch-all route would match the `/` route or not we may want to investigate whether we want to disable this redirection automatically if an `/index.js` file isn't present at root of the pages directory. 

TODO: 

- [x] ensure locale detection/populating works in serverless mode correctly
- [x] add tests for locale handling in different modes, fallback/getStaticProps/getServerSideProps

To be continued in fall-up PRs

- [ ] add tests for revalidate, auto-export, basePath + i18n
- [ ] add mapping of domains with locales
- [ ] investigate detecting locale against non-index routes and populating the locale in a cookie

x-ref: https://github.com/vercel/next.js/issues/17110
2020-10-07 21:11:01 +00:00
..
lib Remove unused dependency (#16168) 2020-08-13 13:40:08 -04:00
hot-middleware.ts Use single webpack runtimeChunk for Node.js compilation (#14722) 2020-07-01 15:34:00 +00:00
hot-reloader.ts Improve server performance by skipping decode/re-encode (#17323) 2020-09-24 06:05:40 +00:00
htmlescape.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
next-dev-server.ts Add initial changes for i18n support (#17370) 2020-10-07 21:11:01 +00:00
next.ts Clean up render.tsx options (#13759) 2020-06-06 23:00:03 +00:00
on-demand-entry-handler.ts Fix app-document-import-order test for webpack 5 (#15224) 2020-07-17 10:38:06 +02:00
static-paths-worker.ts Add initial changes for i18n support (#17370) 2020-10-07 21:11:01 +00:00