- 22 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This updates the fallback 404 handling to render the correct 404 page on the client when a 404 is returned from fetching the data route on a fallback page on the client. This prevents us from having to rely on a cache to be updated by the time we reload the page to prevent non-stop reloading. This also adds handling in serverless mode to ensure the correct 404 page is rendered when leveraging fallback: 'blocking' mode. Additional tests for the fallback: 'blocking' 404 handling will be added in a follow-up where returning notFound from `getServerSideProps` is also added.
-
- 21 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This makes sure the `locales` are passed to `getStaticPaths` and also disables the removing the default locale from the path when the default locale is the preferred header. It also updates tests to ensure the domain redirects are working as expected. x-ref: https://github.com/vercel/next.js/pull/17370
-
- 20 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This makes sure that we detect the correct default locale for domain specific locales since a domain can have a different default locale residing at the root and we need to check this on the client for prerendered/auto-static pages. This also makes sure we disable the built-in redirect handling when on Vercel since it's handled already. Tests for this are tricky since we need to load the browser with a custom domain which requires editing the host file. Existing tests should ensure this doesn't break non-domain specific locale behavior though. This was also tested manually while testing https://github.com/vercel/vercel/pull/5298 x-ref: https://github.com/vercel/next.js/pull/17370
-
- 16 10月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
This makes sure the correct `initialRevalidateSeconds` field is populated in the `prerender-manifest` for non-dynamic SSG pages since they will be inserted into the `initialPageRevalidationMap` under their locale prefixed variant with `i18n` enabled x-ref: https://github.com/vercel/next.js/pull/17370
-
由 JJ Kasper 提交于
* Ensure i18n support with AMP * Fix type error * Update size-limit
-
- 15 10月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
This adds the `locale` prop for `next/link` to allow transitioning between locales client-side and also allows passing the locale to `router.push/replace` via the transition options similar to `shallow` e.g. `router.push('/another', '/another, { locale: 'nl' })` x-ref: https://github.com/vercel/next.js/pull/17370
-
由 JJ Kasper 提交于
This updates to set the `NEXT_LOCALE` cookie to the default locale when the user prefers a different locale from the default in their `accept-language` header but visits the default locale path e.g. `/en-US` with a `accept-language` preferred header of `nl` will set the `NEXT_LOCALE=en-US` header and then redirect to `/` x-ref: https://github.com/vercel/next.js/pull/17370
-
- 14 10月, 2020 3 次提交
-
-
由 Alex Castle 提交于
Co-authored-by: NTim Neutkens <timneutkens@me.com> Co-authored-by: NTim Neutkens <tim@timneutkens.nl>
-
由 JJ Kasper 提交于
Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Jan Potoms 提交于
Co-authored-by: NJJ Kasper <jj@jjsweb.site> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
- 12 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Follow-up to https://github.com/vercel/next.js/pull/17370 this makes sure the locale detection is case-insensitive.
-
- 10 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Follow-up to https://github.com/vercel/next.js/pull/17370 this adds mapping of locales to domains and handles default locales for specific domains also allowing specifying which locales can be visited for each domain. This PR also updates to output all statically generated pages under the locale prefix to make it easier to locate/lookup and to not redirect to the default locale prefixed path when no `accept-language` header is provided.
-
- 09 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Follow-up PR to #17370 this adds generating auto-export, non-dynamic SSG, and fallback pages with all locales. Dynamic SSG pages still control which locales the pages are generated with using `getStaticPaths`. To further control which locales non-dynamic SSG pages will be prerendered with a follow-up PR adding handling for 404 behavior from `getStaticProps` will be needed. x-ref: https://github.com/vercel/next.js/issues/17110
-
- 08 10月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
Follow-up PR to https://github.com/vercel/next.js/pull/17370 when the path is not prefixed with a locale and the default locale is the detected locale it doesn't redirect to locale prefixed variant. If the default locale path is visited and the default locale is visited this also redirects to the root removing the un-necessary locale in the URL. This also exposes the `defaultLocale` on the router since the RFC mentions `Setting a defaultLocale is required in every i18n library so it'd be useful for Next.js to provide it to the application.` although doesn't explicitly spec where we want to expose it. If we want to expose it differently this can be updated.
-
由 JJ Kasper 提交于
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
-
- 05 10月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This makes sure to normalize the params for optional catch-all routes on Vercel since for `fallback: true` pages the `[[...paramName]]` value will be provided for the undefined/root param which needs to be normalized. Tests have been added in https://github.com/vercel/vercel/pull/5247 and were manually tested with the changes in this PR with https://github.com/ijjk/next-update-loader Fixes: https://github.com/vercel/next.js/issues/17220 x-ref: https://github.com/vercel/vercel/pull/5247
-
- 26 9月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
* Expose dotenv loading under separate package * Update pre-compiled * Rename package to @next/env * Update lint ignores * Update package.json Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
- 16 9月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This makes sure we have the correct `asPath` value to prevent breaking hydration for `getServerSideProps` pages and doesn't re-use the `resolvedUrl` value for the `asPath` and instead creates a separate `resolvedAsPath` value that only removes the `_next/data` prefix from the path. Additional tests have been added in the `getServerSideProps` suite to ensure correct `asPath` with rewrites. Fixes: https://github.com/vercel/next.js/issues/17113
-
- 15 9月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
This continues off of https://github.com/vercel/next.js/pull/17081 and provides this normalized `asPath` value in the context provided to `getServerSideProps` to provide the consistent value since the request URL can vary between direct visit and client transition and the alternative requires building the URL each time manually. Kept this change separate from https://github.com/vercel/next.js/pull/17081 since this is addressing a separate issue and allows discussion separately. Closes: https://github.com/vercel/next.js/issues/16407
-
由 JJ Kasper 提交于
This normalizes the `asPath` for `getServerSideProps` and `getStaticProps` pages to ensure it matches the value that would show on the client instead of a) the output pathname when revalidating or generating a fallback or b) the `_next/data` URL on client transition. Fixes: https://github.com/vercel/next.js/issues/16542
-
- 23 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This fixes invalid initial route params in development mode and serverless production mode. It also adds tests to ensure these values are correct in development, production, and serverless mode. x-ref: https://github.com/vercel/next.js/pull/16084 Fixes: https://github.com/vercel/next.js/issues/16481 Fixes: https://github.com/vercel/next.js/issues/16482
-
- 22 8月, 2020 2 次提交
-
-
由 JJ Kasper 提交于
This fixes a client-side file not being transpiled correctly when rewrites are used. The cross browser tests have been updated to make sure there are rewrites so the related code is included and not dead-code eliminated' Closes: https://github.com/vercel/next.js/issues/16440
-
由 JJ Kasper 提交于
This corrects the case where `/index` is used during revalidation for an optional catch-all route and `index` is passed as a param even though it should be undefined. This also adds test cases to make sure the params are normalized correctly Fixes: https://github.com/vercel/next.js/issues/16366
-
- 19 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This interpolates the dynamic values and rebuilds the request URL for fallback SSG pages since the proxy uses the output path for non-prerendered pages on Vercel which can cause inconsistent request URL/`asPath` values for SSG pages. This also adds tests to ensure the `asPath` is correctly updated Fixes: https://github.com/vercel/next.js/issues/16269
-
- 15 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This updates to not automatically append params to the query for rewrites if one or more of the params are already used in the destination's path. No other behavior is being changed and if the user still wants the params in the query after using them in the destination's path they can manually add them like with redirects. Closes: https://github.com/vercel/next.js/issues/15626
-
- 13 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Co-authored-by: NTim Neutkens <timneutkens@me.com>
-
- 07 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
-
- 06 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Since we now use query parameters to pass dynamic route params while routing on Vercel, this makes sure we normalize the request URL before populating the `asPath` Fixes: https://github.com/vercel/next.js/issues/15879
-
- 04 8月, 2020 1 次提交
-
-
由 Prateek Bhatnagar 提交于
- Fixes the serverless build for font optimizations
-
- 29 7月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This updates collecting dynamic route params on Vercel to make sure that missing optional dynamic routes are undefined. Additional tests for this mode have also been added to ensure the params are being collected properly Closes: https://github.com/vercel/next.js/issues/15579
-
- 28 7月, 2020 2 次提交
-
-
由 Prateek Bhatnagar 提交于
Co-authored-by: Natcastle <atcastle@gmail.com>
-
由 Gerald Monaco 提交于
-
- 15 7月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
This PR corrects the data fetching behavior for optional root routes. --- Fixes #14923
-
- 13 7月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This adds handling for custom-routes with `basePath` to automatically add the `basePath` for custom-routes `source` and `destination` unless `basePath: false` is set for the route. Closes: https://github.com/vercel/next.js/issues/14782
-
- 07 7月, 2020 1 次提交
-
-
由 Jan Potoms 提交于
Discovered while working on https://github.com/vercel/next.js/pull/14848 when asPath is the same but href is different it should use `replaceState` instead of `pushState`, so that browser back/forward behavior is preserved. Currently it's comparing a path that includes basepath with one that excludes it, so `pushState` is always used. This makes sure the behavior is the same as when running next.js without a basepath
-
- 01 7月, 2020 2 次提交
-
-
由 Tim Neutkens 提交于
Fixes #11711 Also cleaned up some extra code. This was already supported on the Vercel edge network.
-
由 JJ Kasper 提交于
This makes sure to base64 encode the `.env*` file contents before passing them in the URL for the serverless-loader since `!` is a special character in this case which can cause webpack to fail to build Closes: https://github.com/vercel/next.js/issues/14749
-
- 23 6月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This updates to rely on query values from the proxy when capable to ensure the correct values are provided. This does not remove the `x-now-route-matches` as this is still needed until the values are provided in the query instead for iSSG x-ref: https://github.com/zeit/now/pull/4196 x-ref: https://github.com/zeit/next.js/pull/12250 x-ref: Tested against the following updated fixtures from https://github.com/vercel/vercel/pull/4682 with https://github.com/ijjk/next-update-loader - 08-custom-routes-catchall - 10-export-cache-headers - 16-base-path - 22-ssg-v2 - 23-custom-routes-verbose
-
- 11 6月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
To make `asPath` consistent with `basePath` handling this makes sure it is always stripped including on the client under the `asPath` value and from `req.url` in the `serverless-loader`. Additional tests have been added for this behavior to ensure we don't regress on this Closes: https://github.com/vercel/next.js/issues/14037 Closes: https://github.com/vercel/next.js/issues/14039
-
- 02 6月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
In serverless mode, it's best practice to propagate an unhandled error so that the function is disposed instead of recycled. This helps fix the "bad state" problem.
-