Commit graph

32 commits

Author SHA1 Message Date
Tobias Koppers
94ad03385b
remove commons chunk config (#34445)
This removes the config for the `commons` chunk.

I think the idea was that modules are that in all pages are put into a `commons` chunk, but that breaks when next/dynamic comes into play, which also creates chunks. So the `totalPages` condition is broken and could lead to too many modules placed into the commons chunk.

Example: 2 pages, each has one next/dynamic. Both on demand chunks include module A. page 1 includes module B and next/dynamic on page 2 includes module B. A and B are placed into commons. commonjs chunk is loaded in page 1 and both next/dynamic. Page 1 would load module A even while it doesn't need it.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-02-19 22:26:54 +00:00
JJ Kasper
390e7bd07e
Remove extra config for PR stats (#30478) 2021-10-27 14:30:39 -05:00
Tim Neutkens
bc3ab3ce94
Move swcMinify out of experimental (#29810) 2021-10-25 13:49:11 +02:00
JJ Kasper
61409dd615
Update stats-config for release stats (#29654) 2021-10-05 17:49:24 -05:00
Tim Neutkens
7d664d5b36
Add stats config for SWC (#28883)
* Add stats config for SWC

* Remove stats for deprecated mode

* Include native binaries in local linking

* Expose minify in next-swc

* Build next-swc binaries

* Only upload changed binary artifact

* Build next-swc binaries

* Expose minify in js binding

* Use new minify function in terser plugin

* Build next-swc binaries

* Build next-swc binaries

* Build next-swc binaries

* Pass pagesDir option to SWC for next/dynamic

* Build next-swc binaries

* Add spans for next-trace-entrypoints-plugin

* Fix linting

Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
Co-authored-by: padmaia <padmaia@users.noreply.github.com>
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-14 18:13:11 +02:00
JJ Kasper
4b1bf758b0
Add additional stats app pages (#27202) 2021-07-16 12:13:04 -05:00
JJ Kasper
556216b1ad
Add page with next/image to stats-app (#26973)
* Add page with next/image to stats-app

* Update stats-config

* Update globs

* Only run prettier on js outputs

* only add image page for non-webpack 4 mode

* update config

* Re-add moving page chunks
2021-07-07 09:50:24 -05:00
Tim Neutkens
f5958fdc4f
Simplify stats action (#26751) 2021-06-30 11:41:55 +02:00
Gerald Monaco
1ebf26af78
Remove React version checks and warnings that are no longer needed (#25992)
Canary requires `react@>=17.0.2`, so we no longer need these checks.
2021-06-14 19:34:53 +00:00
Tim Neutkens
e1502bc9a5
Enable webpack5 for all apps (#25639)
* Enable webpack 5 by default for all apps

Still provides a way to opt-out using `webpack5: false` in next.config.js. Also throws an error for `future.webpack5`.

* Update tests

* Update test to run on webpack 4 instead of webpack 5

* disable webpack5 for legacy tests

* Fix stats-config for webpack4

* update tests

* update size for webpack4 test

* move basic suite first

* update basic test

* Add logs

* remove outdated testFutureDependencies job

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-07 15:48:29 -05:00
Tobias Koppers
cc246cdc41
add css to the stats-app (#24228)
add a page with CSS to the stats app

We should compare stats for CSS too
2021-04-19 17:42:40 +00:00
Tobias Koppers
1c2ee7c6b8
improve pr stats action (#24086)
* add cache build duration tracking
* default = webpack 5
* better hash handling
* allow to opt-out of webpack5 via `future.webpack5: false`
2021-04-15 11:46:56 +00:00
JJ Kasper
5febe218a6
Add nccing AMP optimizer (#21980)
This adds ncc'ing the AMP optimizer package to speed up install times and cache the runtime. 

Closes: https://github.com/vercel/next.js/issues/20404
2021-02-11 09:55:56 +00:00
Tobias Koppers
11900431fa
upgrade webpack 5 for empty entrypoint fix (#21353)
fixes a problem where entrypoints are nearly empty.
2021-01-19 19:15:45 +00:00
Tobias Koppers
b02df3f487
improve splitChunks config for webpack 5 (#21208) 2021-01-17 20:05:47 +01:00
Joe Haddad
30c2dfdc47
Remove old modern mode experiment (#19275)
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
2020-11-18 18:30:00 +00:00
JJ Kasper
059741ea00
Update stats-config for new polyfills location (#15584)
This makes sure to not group the polyfills chunk in with the client bundles group now that it is output under chunks instead of runtime
2020-07-28 15:58:13 +00:00
Joe Haddad
a92e976231
Remove remaining granular chunks references (#13672)
This removes remaining references to `granularChunks` in configs, error messages, and comments.

Also removed the `process.env.__NEXT_GRANULAR_CHUNKS` value.

---

Follow up to: https://github.com/vercel/next.js/pull/13663
2020-06-02 14:45:07 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
JJ Kasper
0b51b2340a
Add stats config for load tests (#11868) 2020-04-13 22:00:12 -04:00
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
Joe Haddad
0022633d37
Track framework bundle separately (#9322) 2019-11-05 16:30:03 -05:00
Joe Haddad
42fca6fd15
Track polyfill file changes (#9321) 2019-11-05 16:15:42 -05:00
Joe Haddad
d031cf64df
Ensure requests are resolved as directories (#8742)
* Ensure requests are resolved as directories
`resolveRequest` will strip down to baseDir if there's no trailing slash as it assumes you passed a file.

* Disable telemetry for PR Stats
2019-09-14 17:41:05 -04:00
JJ Kasper
8444c1ffba
Update stats-config to be more deterministic (#8679) 2019-09-09 16:06:13 -05:00
JJ Kasper
110c83fa44 Update commons glob for granular chunks (#8622) 2019-09-05 00:48:09 +02:00
JJ Kasper
12c211bdbe Add config for diffing fetched pages (#8492) 2019-08-23 19:36:44 -04:00
Joe Haddad
df4f600291
🗜 Optimize client-side routing manifest (#8429)
* Optimize client-side routing manifest

* Turn on granularChunks for tests

* Add row for build manifest

* Hack it
2019-08-20 02:28:09 -04:00
Jason Miller
d8fe224951 Hook destructuring optimization (#8381)
* Add hook destructuring optimization

* oops, accidentally included loose mode

* inline hook destructuring optimization plugin

* fix test nesting

* fix lockfile

* allow any react hook

* Add page to stats-app with hooks
2019-08-15 18:08:06 -04:00
JJ Kasper
e539af46fa
Update to use dynamic port for stats-app (#8336)
* Update to use dynamic port for stats-app

* Update main.workflow
2019-08-12 13:53:11 -05:00
JJ Kasper
fc7e235f2c Followup optimizations for new experimentalPrerender (#8287)
* Add checking for hybrid AMP during static check

* Update to always hit server for prerender data

* Add removing of SPR code when not used

* Add checking for hybrid AMP during static check

* Update to always hit server for prerender data

* Add removing of SPR code when not used

* Update dead code elimination
2019-08-11 21:56:57 -04:00
JJ Kasper
f01af7cefb Add config/test app for new PR stats set-up (#8317)
* Add config/test app for new PR stats set-up

* Move config/test app to test folder
2019-08-12 00:28:41 +02:00