1. 15 10月, 2020 2 次提交
  2. 14 10月, 2020 3 次提交
  3. 12 10月, 2020 2 次提交
  4. 10 10月, 2020 1 次提交
    • J
      Add handling for domain to locale mapping (#17771) · 5cab03fe
      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. 
      5cab03fe
  5. 09 10月, 2020 1 次提交
  6. 08 10月, 2020 2 次提交
    • J
      Update to have default locale matched on root (#17669) · bbc1a21c
      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. 
      bbc1a21c
    • J
      Add initial changes for i18n support (#17370) · b2d1d87e
      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
      b2d1d87e
  7. 26 9月, 2020 1 次提交
  8. 24 9月, 2020 1 次提交
    • J
      Improve server performance by skipping decode/re-encode (#17323) · c351f615
      Joe Haddad 提交于
      Prior to this pull request, Next.js would immediately decode all URLs sent to its server (via `path-match`).
      
      This was rarely needed, and Next.js would typically re-encode the incoming request right away (see all the `encodeURIComponent`s removed in PR diff). This adds unnecessary performance overhead.
      
      Long term, this will also help prevent weird encoding edge-cases like #10004, #10022, #11371, et al.
      
      ---
      
      No new tests are necessary for this change because we've extensively tested these edge cases with existing tests.
      One test was updated to reflect that we skip decoding in a 404 scenario.
      
      Let's see if all the existing tests pass!
      c351f615
  9. 16 9月, 2020 1 次提交
  10. 15 9月, 2020 2 次提交
  11. 22 8月, 2020 1 次提交
  12. 21 8月, 2020 1 次提交
  13. 20 8月, 2020 1 次提交
  14. 13 8月, 2020 1 次提交
  15. 12 8月, 2020 1 次提交
  16. 11 8月, 2020 1 次提交
  17. 06 8月, 2020 1 次提交
    • A
      Add experimental image post-processing (#15875) · b6060fa4
      Alex Castle 提交于
      This PR adds a second experimental post-processing step for the framework introduced by @prateekbh in #14746. The image post-processing step scans the rendered document for the first few images and uses a simple heuristic to determine if the images should be automatically preloaded.
      
      Analysis of quite a few production Next apps has shown that a lot of sites are taking a substantial hit to their [LCP](https://web.dev/lcp/) score because an image that's part of the "hero" element on the page is not preloaded and is getting downloaded with lower priority than the JavaScript bundles. This post-processor should automatically fix that for a lot of sites, without causing any real performance effects in cases where it fails to identify the hero image.
      
      This feature is behind an experimental flag, and will be subject to quite a bit of experimentation and tweaking before it's ready to be made a default setting.
      b6060fa4
  18. 04 8月, 2020 1 次提交
    • J
      Add support for `fallback: 'blocking'` (#15672) · e8183899
      Joe Haddad 提交于
      By popular request, this pull request adds support for returning `fallback: 'blocking'` from `getStaticPaths`.
      
      This new mode will cause unknown paths to be rendered on-demand ("SSR") without the static (placeholder) fallback.
      
      This feature is **currently experimental and should not be used in production yet**. It's currently flagged behind `unstable_`:
      
      ```
      fallback: 'unstable_blocking'
      ```
      
      TODO:
      
      - [x] Next.js tests
      - [ ] Add Vercel support
      - [ ] Vercel tests
      
      ---
      
      Fixes #15637
      e8183899
  19. 29 7月, 2020 1 次提交
  20. 28 7月, 2020 2 次提交
  21. 13 7月, 2020 1 次提交
  22. 01 7月, 2020 1 次提交
  23. 30 6月, 2020 1 次提交
  24. 29 6月, 2020 1 次提交
  25. 23 6月, 2020 3 次提交
  26. 21 6月, 2020 1 次提交
  27. 18 6月, 2020 1 次提交
  28. 15 6月, 2020 1 次提交
  29. 11 6月, 2020 1 次提交
  30. 10 6月, 2020 1 次提交
  31. 07 6月, 2020 1 次提交