-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CNA build target in tsconfig #25780
Update CNA build target in tsconfig #25780
Conversation
This comment has been minimized.
This comment has been minimized.
Failing test suitesCommit: fcac8f0 test/integration/rewrite-with-browser-history/test/index.test.js
Expand output● rewrites persist with browser history actions › dev mode › back-button should go back to rewritten path successfully
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is es2015 because Next.js outputs JS compatible with IE11 currently. It can be changed in the near future but it'll require more work than just changing this target. The target is not used by Next.js btw, it's only there to ensure your editor knows what the output is like.
@timneutkens |
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
buildDuration | 14s | 14.1s | |
buildDurationCached | 3.6s | 3.3s | -323ms |
nodeModulesSize | 46.7 MB | 46.7 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.995 | 2.844 | -0.15 |
/ avg req/sec | 834.76 | 879.05 | +44.29 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.703 | 1.648 | -0.06 |
/error-in-render avg req/sec | 1467.7 | 1516.76 | +49.06 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
framework-HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 20.2 kB | 20.2 kB | ✓ |
webpack-HASH.js gzip | 804 B | 804 B | ✓ |
Overall change | 60.3 kB | 60.3 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_app-HASH.js gzip | 801 B | 801 B | ✓ |
_error-HASH.js gzip | 3.07 kB | 3.07 kB | ✓ |
amp-HASH.js gzip | 527 B | 527 B | ✓ |
css-HASH.js gzip | 334 B | 334 B | ✓ |
hooks-HASH.js gzip | 890 B | 890 B | ✓ |
index-HASH.js gzip | 263 B | 263 B | ✓ |
link-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..HASH.js gzip | 333 B | 333 B | ✓ |
withRouter-HASH.js gzip | 330 B | 330 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 8.31 kB | 8.31 kB | ✓ |
Client Build Manifests
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_buildManifest.js gzip | 391 B | 391 B | ✓ |
Overall change | 391 B | 391 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
index.html gzip | 572 B | 572 B | ✓ |
link.html gzip | 579 B | 579 B | ✓ |
withRouter.html gzip | 567 B | 567 B | ✓ |
Overall change | 1.72 kB | 1.72 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
buildDuration | 16s | 15.4s | -680ms |
buildDurationCached | 4.3s | 4.4s | |
nodeModulesSize | 46.7 MB | 46.7 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
framework-HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-HASH.js gzip | 20.2 kB | 20.2 kB | ✓ |
webpack-HASH.js gzip | 804 B | 804 B | ✓ |
Overall change | 60.3 kB | 60.3 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_app-HASH.js gzip | 801 B | 801 B | ✓ |
_error-HASH.js gzip | 3.07 kB | 3.07 kB | ✓ |
amp-HASH.js gzip | 527 B | 527 B | ✓ |
css-HASH.js gzip | 334 B | 334 B | ✓ |
hooks-HASH.js gzip | 890 B | 890 B | ✓ |
index-HASH.js gzip | 263 B | 263 B | ✓ |
link-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..HASH.js gzip | 333 B | 333 B | ✓ |
withRouter-HASH.js gzip | 330 B | 330 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 8.31 kB | 8.31 kB | ✓ |
Client Build Manifests
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_buildManifest.js gzip | 391 B | 391 B | ✓ |
Overall change | 391 B | 391 B | ✓ |
Serverless bundles Overall increase ⚠️
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_error.js | 16.9 kB | 16.9 kB | |
404.html | 2.44 kB | 2.44 kB | ✓ |
500.html | 2.43 kB | 2.43 kB | ✓ |
amp.amp.html | 10.8 kB | 10.8 kB | ✓ |
amp.html | 1.63 kB | 1.63 kB | ✓ |
css.html | 1.81 kB | 1.81 kB | ✓ |
hooks.html | 1.69 kB | 1.69 kB | ✓ |
index.js | 17.2 kB | 17.2 kB | |
link.js | 17.4 kB | 17.4 kB | ✓ |
routerDirect.js | 17.4 kB | 17.4 kB | ✓ |
withRouter.js | 17.4 kB | 17.4 kB | ✓ |
Overall change | 107 kB | 107 kB |
Webpack 4 Mode (Decrease detected ✓)
General
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
buildDuration | 12.5s | 12.2s | -338ms |
buildDurationCached | 4.8s | 4.7s | -108ms |
nodeModulesSize | 46.7 MB | 46.7 MB | ✓ |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.884 | 2.865 | -0.02 |
/ avg req/sec | 866.84 | 872.5 | +5.66 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.619 | 1.703 | |
/error-in-render avg req/sec | 1544.13 | 1467.73 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
677f882d2ed8..HASH.js gzip | 13.3 kB | 13.3 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-HASH.js gzip | 7.99 kB | 7.99 kB | ✓ |
webpack-HASH.js gzip | 751 B | 751 B | ✓ |
Overall change | 61.1 kB | 61.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.07 kB | 1.07 kB | ✓ |
_error-HASH.js gzip | 3.74 kB | 3.74 kB | ✓ |
amp-HASH.js gzip | 536 B | 536 B | ✓ |
css-HASH.js gzip | 339 B | 339 B | ✓ |
hooks-HASH.js gzip | 887 B | 887 B | ✓ |
index-HASH.js gzip | 227 B | 227 B | ✓ |
link-HASH.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..HASH.js gzip | 303 B | 303 B | ✓ |
withRouter-HASH.js gzip | 302 B | 302 B | ✓ |
e025d2764813..52f.css gzip | 125 B | 125 B | ✓ |
Overall change | 9.16 kB | 9.16 kB | ✓ |
Client Build Manifests
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
_buildManifest.js gzip | 420 B | 420 B | ✓ |
Overall change | 420 B | 420 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | matamatanot/next.js update-CNA-tsconfig-build-target | Change | |
---|---|---|---|
index.html gzip | 627 B | 627 B | ✓ |
link.html gzip | 633 B | 633 B | ✓ |
withRouter.html gzip | 620 B | 620 B | ✓ |
Overall change | 1.88 kB | 1.88 kB | ✓ |
Ah yeah you're right, sorry I missed that it's not the template but the root tsconfig. |
Feature
Change
compilerOptions.target
"es2015" to "es2019"You can update the target as Next.js is now only supported in Node 12 or later. This is expected to reduce the build size and improve performance.
The official TypeScript wiki is as follows.
https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-12