- 24 8月, 2020 1 次提交
-
-
由 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
👍
-
- 22 8月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
Fixes #16259 Caused by #16022 Follow up issue: #16450 This PR skips polyfilling Node modules in webpack 4 which are ignored by the `browsers` key.
-
- 18 8月, 2020 1 次提交
-
-
由 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.
-
- 13 8月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
Co-authored-by: NTim Neutkens <timneutkens@me.com>
-
- 11 8月, 2020 1 次提交
-
-
由 Prateek Bhatnagar 提交于
Co-authored-by: NTim Neutkens <tim@timneutkens.nl> Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
- 10 8月, 2020 2 次提交
-
-
由 Tim Neutkens 提交于
Co-authored-by: NKristoffer K. <merceyz@users.noreply.github.com>
-
由 Tim Neutkens 提交于
This adds the following Node.js core polyfills only when the import is used: - `path` - `stream` - `vm` - `crypto` - `buffer` Fixes #15948 We'll have a separate issue about adding warnings for the usage of these modules in the browser, some polyfills like crypto are quite heavy and generally not needed for most applications (included accidentally through node_modules).
-
- 06 8月, 2020 2 次提交
-
-
由 Joe Haddad 提交于
-
由 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.
-
- 05 8月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
Next.js plugins like `@next/mdx` inject additional webpack loaders to compile files, but they omit the necessary loader for Fast Refresh to work. Instead of making these files deopt out of Fast Refresh, we can automatically detect and inject the loader in these cases. Fixes #13574
-
- 03 8月, 2020 3 次提交
-
-
由 Jan Potoms 提交于
In terms of url rewriting, `trailingSlash` supports everything `exportTrailingSlash` does. We can just share all other code paths and deprecate `exportTrailingSlash`. This PR shows a deprecation warning when `exportTrailingSlash` is used. Also fixes https://github.com/vercel/next.js/issues/15774 We can update the tests now or later. (I kept them the same to prove it's non-breaking) To do: - [x] Do we want to keep this? => nope https://github.com/vercel/next.js/blob/841d4efc517a379d8947f491e3c6a1c4784bbccf/packages/next/next-server/lib/router/router.ts#L329 - [x] I kept `exportTrailingSlash` here. Do we want to rename that as well? => nope https://github.com/vercel/next.js/blob/2d9d649d492b77adeddea0242ab6b7fe73d18079/packages/next/build/index.ts#L959
-
由 Tim Neutkens 提交于
- Use latest terser version (still 1 warning in the stable version which is an open PR) - Add emitOnErrors instead of noEmitOnErrors - Added trace-deprecations for Next.js core development
-
由 Tim Neutkens 提交于
- Using `namedChunks` where possible, this will also allow for faster access to the chunks as we no longer have to look them up like we did before using `find` - Using the new asset hooks introduced in the latest webpack beta - Using the new externals function signature
-
- 31 7月, 2020 1 次提交
-
-
由 Rafau 提交于
I think this is necessary for IE11. via [Webpack docs](https://webpack.js.org/migrate/5/#turn-off-es2015-syntax-in-runtime-code-if-necessary) > By default, webpack's runtime code uses ES2015 syntax to build smaller bundles. If your build targets environments that don't support this syntax (like IE11), you'll need to set output.ecmaVersion: 5 to revert to ES5 syntax. Thank you
-
- 30 7月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
-
- 28 7月, 2020 3 次提交
-
-
由 Prateek Bhatnagar 提交于
Co-authored-by: Natcastle <atcastle@gmail.com>
-
由 Jean Helou 提交于
-
由 Tim Neutkens 提交于
-
- 21 7月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
Closes #15330
-
- 20 7月, 2020 2 次提交
-
-
由 Tim Neutkens 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 Tim Neutkens 提交于
This particular variable was not being read correctly. Added a test for the behavior. Fixes #15261
-
- 17 7月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 16 7月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 12 7月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Found while working on figuring out this bug: https://twitter.com/timneutkens/status/1282129714627448832 I noticed that the node_modules got passed by the ignore still because when chokidar identifies a ignore pattern is a glob it treats the glob as-is instead of appending `/**` to the glob
-
- 10 7月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 09 7月, 2020 2 次提交
-
-
由 Tim Neutkens 提交于
Co-authored-by: NTobias Koppers <sokra@users.noreply.github.com>
-
由 Darsh Patel 提交于
Removed Option to enable `ReactProductionProfiling` from configuration and added a CLI switch for the same. Users can now do `next build --profile` to enable react production profiling. Also added a warning to notify users about the performance impact Fixes: #14688
-
- 06 7月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This updates the scroll position saving to occur as the scroll position changes instead of trying to do it when the navigation is changing since the `popState` event doesn't allow us to update the leaving history state once the `popState` has occurred. The order of events that was previously attempted to save scroll position on a `popState` event (back/forward navigation) 1. history.state is already updated with state from `popState` 2. we replace state with the currently rendered page adding scroll info 3. we replace state again with the `popState` event state overriding scroll info Using this approach the above event order is no longer in conflict since we don't attempt to populate the state with scroll position while it's leaving the state and instead do it while it is still the active state in history This approach resembles existing solutions: https://www.npmjs.com/package/scroll-behavior https://twitter.com/ryanflorence/status/1029121580855488512 Fixes: https://github.com/vercel/next.js/issues/13990 Fixes: #12530 x-ref: https://github.com/vercel/next.js/pull/14075
-
- 01 7月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Webpack 5 supports a single runtimechunk for the Node.js compilation, this solves sharing modules between entrypoints.
-
- 28 6月, 2020 1 次提交
-
-
由 Todor Totev 提交于
Closes [13709](https://github.com/vercel/next.js/issues/13709). The solution works, **(tested and confirmed with true and false flags with the latest next version)** though I am quite sure this is not the most elegant and proper way to implement it. I have spent the good part of yesterday and today's morning in order to make it more generic but since it's my first time working with anything related to webpack I have struggled miserably. Last, but not least I'm unsure if this is the most proper naming for the flag. Please, let me know what you want me to change and I'll get it done asap.
-
- 26 6月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Simplifies on-demand-entries a bit.
-
- 24 6月, 2020 2 次提交
-
-
由 James Mosier 提交于
Warn users and revert their `devtool` when they manually change the `devtool` in development mode. For this addition, I check to ensure the `devtool` is custom (i.e. different than what is set by Next) and has a value (`false` is fine as a custom `devtool`!). As described in [this issue (13963)](https://github.com/vercel/next.js/issues/13963), changing the `devtool` in development mode can cause issues with performance. Fixes #13963
-
由 Jan Potoms 提交于
Not sure if it's still there for a reason, but from the types for `NoEmitOnErrorsPlugin` ```js /* @deprecated use config.optimization.noEmitOnErrors */ ```
-
- 23 6月, 2020 3 次提交
-
-
由 Tim Neutkens 提交于
Initial PR to make `next build` work with webpack 5, still needs more work to make sure runtimeChunk and such are shared between pages. - No longer needs the custom ChunkNamesPlugin as the default behavior was changed - Dropping AMP First client page bundles is now compatible
-
由 Jan Potoms 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co> Co-authored-by: NTim Neutkens <timneutkens@me.com>
-
由 Tim Neutkens 提交于
Gets rid of the custom function for naming files by removing buildId from the file paths.
-
- 21 6月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Updates the way filenames are generated for browser compilation. Notably: - All entry bundles now have hashes in production, this includes pages (previously pages used a buildId in the path) - The AmpFiles no longer depends on hardcoded bundle names, it uses the buildManifest instead (internals) - All cases where we match the page name from the chunk/entrypoint name now use the same function `getRouteFromEntrypoint` (internals) - In development we no longer include the "faked" `buildId` set to `development` for page files, instead we just use the `/_next/static/pages` path (was `/_next/static/development/pages`). This was changed as it caused unneeded complexity and makes generating the bundles easier (internals) - Updated tons of tests to be more resilient to these changes by relying on the buildManifest instead of hardcoded paths (internals) Follow up of these PRs: https://github.com/vercel/next.js/pull/13759 https://github.com/vercel/next.js/pull/13870 https://github.com/vercel/next.js/pull/13937 https://github.com/vercel/next.js/pull/14130 https://github.com/vercel/next.js/pull/14176 https://github.com/vercel/next.js/pull/14268 Fixes #6303 Fixes #12087 Fixes #1948 Fixes #4368 Fixes #4255 Fixes #2548
-
- 18 6月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
This moves the experimental `basePath` config out of the `experimental` section to prepare it for being stable
-
- 17 6月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Tweaked the config that can already be updated a bit.
-
- 11 6月, 2020 1 次提交
-
-
由 Tim Neutkens 提交于
Co-authored-by: NJJ Kasper <jj@jjsweb.site> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-