1. 29 12月, 2020 1 次提交
  2. 22 12月, 2020 1 次提交
    • J
      temporary: re-flag font optimization (#20372) · 260ab519
      Joe Haddad 提交于
      There's currently two bugs with the font optimization, but we'd really like to ship a stable version.
      
      To unblock the stable release, we're **temporarily** reflagging this. It'll be unflagged on canary again!
      260ab519
  3. 17 12月, 2020 1 次提交
  4. 13 12月, 2020 1 次提交
  5. 08 12月, 2020 1 次提交
  6. 04 12月, 2020 3 次提交
  7. 02 12月, 2020 3 次提交
  8. 19 11月, 2020 1 次提交
    • J
      Remove old modern mode experiment (#19275) · 30c2dfdc
      Joe Haddad 提交于
      This PR removes the modern mode experiment because:
      
      - It does not yield meaningful bundle size wins when compared to other initiatives we've taken
      - It's not compatible with webpack 5 (which we're upgrading to)
      - It's currently broken and causes most apps to malfunction
      - There's no champion currently owning the experiment
      
      We can re-introduce this in the future when we'd like to make it a default for all Next.js apps.
      
      Note: **Next.js still supports Differential Loading (`nomodule`) and does it by default.** This PR strictly removes the experimental modern _syntax_, and does not disable our existing modern/legacy polyfilling.
      
      ---
      
      Fixes #19200
      Fixes #18960
      Fixes #14707
      Fixes #14465
      30c2dfdc
  9. 06 11月, 2020 2 次提交
  10. 05 11月, 2020 1 次提交
    • G
      ncc Babel inlining (#18768) · 64850a83
      Guy Bedford 提交于
      This adds inlining for Babel and the Babel plugins used in next.
      
      This is based to the PR at https://github.com/vercel/next.js/pull/18823.
      
      The approach is to make one large bundle and then separate out the individual packages from that in order to avoid duplications.
      
      In the first attempt the Babel bundle size was 10MB... using "resolutions" in the Yarn workspace to reduce the duplicated packages this was brought down to a 2.8MB bundle for Babel and all the used plugins which is exactly the expected file size here.
      
      This will thus add a 2.8MB download size to the next package, but save downloading any babel dependencies separately, removing a large number of package dependencies from the overall install.
      64850a83
  11. 02 11月, 2020 1 次提交
  12. 27 10月, 2020 4 次提交
  13. 25 10月, 2020 1 次提交
  14. 22 10月, 2020 1 次提交
  15. 21 10月, 2020 1 次提交
  16. 20 10月, 2020 2 次提交
  17. 17 10月, 2020 1 次提交
  18. 14 10月, 2020 2 次提交
  19. 08 10月, 2020 1 次提交
    • 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
  20. 15 9月, 2020 1 次提交
    • J
      Update webpack 5 resolving (#17095) · a4c97c5c
      JJ Kasper 提交于
      On the latest beta of webpack 5 resolving fails with the below error and according to https://github.com/webpack/webpack/issues/11467 is due to the imports in this module not being fully specified. This adds the config mentioned in the thread to correct the resolving for this module. 
      
      ```sh
      Failed to compile.
      --
      16:33:50.046 | ModuleNotFoundError: Module not found: Error: Can't resolve './assertThisInitialized' in '/vercel/f03cc85/node_modules/@babel/runtime/helpers/esm'
      16:33:50.046 | > Build error occurred
      16:33:50.047 | Error: > Build failed because of webpack errors
      16:33:50.047 | at build (/vercel/f03cc85/node_modules/next/dist/build/index.js:15:918)
      16:33:50.099 | error Command failed with exit code 1.
      ```
       
      a4c97c5c
  21. 14 9月, 2020 1 次提交
    • J
      [Fix] `webpack@5.0.0-beta.30`: Invalid configuration (#17045) · 80000f42
      Jens Meindertsma 提交于
      Earlier today #17038 was merged which I opened to fix a problem when using `webpack@5.0.0-beta.30` with Next.js using the new Webpack 5 support. In that PR, the only change was the renaming of a configuration key. I later discovered that the change on the Webpack side was different than I initially thought, and this meant that the fix I submittted to Next.js didn't work.
      
      This PR intends to fix the remaining problems. Webpack 5 now accepts a `environment` key that can be used to configure the target output. Previously, this was known as `ecmaVersion` and accepted a number. Now, `environment` accepts a configuration object with individual options. I've configured this in such a way where it resembles an ES5 environment:
      ```js
      environment: {
         arrowFunction: false,
         bigIntLiteral: false,
         const: false,
         destructuring: false,
         dynamicImport: false,
         forOf: false,
         module: false,
      }
      ```
      80000f42
  22. 12 9月, 2020 1 次提交
    • J
      Fix Webpack 5 configuration for v5.0.0-beta.30 (#17038) · 4af5032e
      Jens Meindertsma 提交于
      This PR fixes #17035. As described in the issue, there was a breaking change in `webpack@5.0.0-beta.30`: `output.ecmaVersion` was replaced by `output.environment`. This meant Next.js apps using this `webpack` version would break. This PR updates the relevant Webpack config.
      
      I think this will break any apps that are still using `webpack@5.0.0-beta.29`, but I don't know whether that is a problem as this is a beta feature. If it is, I'd love it if someone could let me know how to detect beta versions in the code so I can make it backwards-compatible.
      4af5032e
  23. 01 9月, 2020 1 次提交
  24. 25 8月, 2020 1 次提交
  25. 24 8月, 2020 1 次提交
    • T
      Add webpack 5 cache invalidation (#16494) · f2ba97d8
      Tim Neutkens 提交于
      Handles:
      
      - Next.js version
      - next.config.js `env` key
      - `NEXT_PUBLIC_` prefixed environment variables
      - next.config.js keys that affect performance
      
      Ideally we don't invalidate the whole cache when `NEXT_PUBLIC_` / `env` key variables change, but this is just to initially make the caching reliable, this behavior is similar to the current webpack 4 behavior, so it can only be improved 👍 
      f2ba97d8
  26. 22 8月, 2020 1 次提交
  27. 18 8月, 2020 1 次提交
    • T
      Add experimental webpack 5 cache option (#16307) · 0fbc9d23
      Tim Neutkens 提交于
      Don't use this yet as it's still being developed. This is a first iteration that enables the webpack cache. There's still more to do here, for example if css modules are used there's currently a bug where webpack does not save the cache for browser compilation (impacting build performance). @sokra is going to look into that issue.
      0fbc9d23
  28. 13 8月, 2020 1 次提交
  29. 11 8月, 2020 1 次提交
  30. 10 8月, 2020 1 次提交