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
Add codemod for files that do not support the new React JSX transform #21281
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously our automatic React injection approach injected `import React from 'react'` automatically whenever JSX was detected. The new official JSX transform solves this by enforcing importing `React` when it is used. This codemod automatically converted files that are using a "global React variable" to use `import React from 'react'`
timneutkens
requested review from
chibicode,
ijjk,
lfades and
Timer
as code owners
January 18, 2021 13:19
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall increase
|
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 9.1s | 8.9s | -158ms |
nodeModulesSize | 77.6 MB | 77.6 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.745 | 1.782 | |
/ avg req/sec | 1432.35 | 1402.96 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.097 | 1.099 | 0 |
/error-in-render avg req/sec | 2277.99 | 2274.75 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 614 B | 614 B | ✓ |
link.html gzip | 621 B | 621 B | ✓ |
withRouter.html gzip | 608 B | 608 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | ✓ |
Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.4s | 10.6s | |
nodeModulesSize | 77.6 MB | 77.6 MB | -10 kB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Serverless bundles
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_error.js | 1 MB | 1 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1 MB | 1 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | ✓ |
routerDirect.js | 1.05 MB | 1.05 MB | ✓ |
withRouter.js | 1.05 MB | 1.05 MB | ✓ |
Overall change | 5.18 MB | 5.18 MB | ✓ |
Webpack 5 Mode (Decrease detected ✓)
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 11.2s | 11s | -143ms |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.722 | 1.753 | |
/ avg req/sec | 1451.97 | 1425.75 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.1 | 1.116 | |
/error-in-render avg req/sec | 2272 | 2240.19 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
597-3bd7d6bd..868b.js gzip | 13 kB | 13 kB | ✓ |
778-d412f8e7..3ee1.js gzip | 6.56 kB | 6.56 kB | ✓ |
838-adcbad39..6e83.js gzip | 31.1 kB | 31.1 kB | ✓ |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-6a6a792..6877.js gzip | 96 B | 96 B | ✓ |
webpack-e302..54e9.js gzip | 954 B | 954 B | ✓ |
Overall change | 91 kB | 91 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-a0..538c.js gzip | 88 B | 88 B | ✓ |
Overall change | 88 B | 88 B | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-a5b2e84..33cf.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-6f1f9..5577.js gzip | 3.38 kB | 3.38 kB | ✓ |
hooks-725de8..0a15.js gzip | 904 B | 904 B | ✓ |
index-939503..6e1c.js gzip | 232 B | 232 B | ✓ |
link-e0cc871..fdbb.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..9360.js gzip | 308 B | 308 B | ✓ |
withRouter-6..44ec.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.02 kB | 8.02 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 299 B | 299 B | ✓ |
Overall change | 299 B | 299 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 585 B | 585 B | ✓ |
link.html gzip | 592 B | 592 B | ✓ |
withRouter.html gzip | 581 B | 581 B | ✓ |
Overall change | 1.76 kB | 1.76 kB | ✓ |
Diffs
Diff for index.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "DwUMqCT9e1yS3Bno1JNGy",
+ "buildId": "nzSUuIAzGcZOC3kCeVZiD",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_buildManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_ssgManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "DwUMqCT9e1yS3Bno1JNGy",
+ "buildId": "nzSUuIAzGcZOC3kCeVZiD",
"isFallback": false,
"gip": true
}
@@ -82,11 +82,11 @@
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_buildManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_ssgManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "DwUMqCT9e1yS3Bno1JNGy",
+ "buildId": "nzSUuIAzGcZOC3kCeVZiD",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_buildManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/DwUMqCT9e1yS3Bno1JNGy/_ssgManifest.js"
+ src="/_next/static/nzSUuIAzGcZOC3kCeVZiD/_ssgManifest.js"
async=""
></script>
</body>
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 8.5s | 8.8s | |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.689 | 1.704 | |
/ avg req/sec | 1480.13 | 1467.08 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.09 | 1.069 | -0.02 |
/error-in-render avg req/sec | 2292.71 | 2338.2 | +45.49 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 614 B | 614 B | ✓ |
link.html gzip | 621 B | 621 B | ✓ |
withRouter.html gzip | 608 B | 608 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.4s | 10.5s | |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Serverless bundles
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_error.js | 1 MB | 1 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1 MB | 1 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | ✓ |
routerDirect.js | 1.05 MB | 1.05 MB | ✓ |
withRouter.js | 1.05 MB | 1.05 MB | ✓ |
Overall change | 5.18 MB | 5.18 MB | ✓ |
Webpack 5 Mode (Decrease detected ✓)
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.6s | 10.6s | -59ms |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.703 | 1.747 | |
/ avg req/sec | 1467.82 | 1430.92 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.058 | 1.091 | |
/error-in-render avg req/sec | 2363.51 | 2291.47 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
597-3bd7d6bd..868b.js gzip | 13 kB | 13 kB | ✓ |
778-d412f8e7..3ee1.js gzip | 6.56 kB | 6.56 kB | ✓ |
838-adcbad39..6e83.js gzip | 31.1 kB | 31.1 kB | ✓ |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-6a6a792..6877.js gzip | 96 B | 96 B | ✓ |
webpack-e302..54e9.js gzip | 954 B | 954 B | ✓ |
Overall change | 91 kB | 91 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-a0..538c.js gzip | 88 B | 88 B | ✓ |
Overall change | 88 B | 88 B | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-a5b2e84..33cf.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-6f1f9..5577.js gzip | 3.38 kB | 3.38 kB | ✓ |
hooks-725de8..0a15.js gzip | 904 B | 904 B | ✓ |
index-939503..6e1c.js gzip | 232 B | 232 B | ✓ |
link-e0cc871..fdbb.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..9360.js gzip | 308 B | 308 B | ✓ |
withRouter-6..44ec.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.02 kB | 8.02 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 299 B | 299 B | ✓ |
Overall change | 299 B | 299 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 585 B | 585 B | ✓ |
link.html gzip | 592 B | 592 B | ✓ |
withRouter.html gzip | 581 B | 581 B | ✓ |
Overall change | 1.76 kB | 1.76 kB | ✓ |
Diffs
Diff for index.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "WO2zyvcOEEbSfb7x2k5cf",
+ "buildId": "NkHckV_x2SsSneWT0cdQZ",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_buildManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_ssgManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "WO2zyvcOEEbSfb7x2k5cf",
+ "buildId": "NkHckV_x2SsSneWT0cdQZ",
"isFallback": false,
"gip": true
}
@@ -82,11 +82,11 @@
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_buildManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_ssgManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "WO2zyvcOEEbSfb7x2k5cf",
+ "buildId": "NkHckV_x2SsSneWT0cdQZ",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_buildManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/WO2zyvcOEEbSfb7x2k5cf/_ssgManifest.js"
+ src="/_next/static/NkHckV_x2SsSneWT0cdQZ/_ssgManifest.js"
async=""
></script>
</body>
Timer
requested changes
Jan 18, 2021
…t.js into add/react-import-codemod
Stats from current PRDefault Server Mode (Decrease detected ✓)General
Page Load Tests Overall decrease
|
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.577 | 1.717 | |
/ avg req/sec | 1585.18 | 1456.39 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 0.992 | 1.134 | |
/error-in-render avg req/sec | 2521.19 | 2205.36 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 614 B | 614 B | ✓ |
link.html gzip | 621 B | 621 B | ✓ |
withRouter.html gzip | 608 B | 608 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.4s | 10.1s | -327ms |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Serverless bundles
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_error.js | 1 MB | 1 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1 MB | 1 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | ✓ |
routerDirect.js | 1.05 MB | 1.05 MB | ✓ |
withRouter.js | 1.05 MB | 1.05 MB | ✓ |
Overall change | 5.18 MB | 5.18 MB | ✓ |
Webpack 5 Mode (Increase detected ⚠️ )
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.7s | 10.4s | -264ms |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.672 | 1.705 | |
/ avg req/sec | 1495.61 | 1466.04 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.111 | 0.977 | -0.13 |
/error-in-render avg req/sec | 2249.36 | 2559.31 | +309.95 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
597-3bd7d6bd..868b.js gzip | 13 kB | 13 kB | ✓ |
778-d412f8e7..3ee1.js gzip | 6.56 kB | 6.56 kB | ✓ |
838-adcbad39..6e83.js gzip | 31.1 kB | 31.1 kB | ✓ |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-6a6a792..6877.js gzip | 96 B | 96 B | ✓ |
webpack-e302..54e9.js gzip | 954 B | 954 B | ✓ |
Overall change | 91 kB | 91 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-a0..538c.js gzip | 88 B | 88 B | ✓ |
Overall change | 88 B | 88 B | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-a5b2e84..33cf.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-6f1f9..5577.js gzip | 3.38 kB | 3.38 kB | ✓ |
hooks-725de8..0a15.js gzip | 904 B | 904 B | ✓ |
index-939503..6e1c.js gzip | 232 B | 232 B | ✓ |
link-e0cc871..fdbb.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..9360.js gzip | 308 B | 308 B | ✓ |
withRouter-6..44ec.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.02 kB | 8.02 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 299 B | 299 B | ✓ |
Overall change | 299 B | 299 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 585 B | 585 B | ✓ |
link.html gzip | 592 B | 592 B | ✓ |
withRouter.html gzip | 581 B | 581 B | ✓ |
Overall change | 1.76 kB | 1.76 kB | ✓ |
Diffs
Diff for index.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "uj0zAuCtQYmV-6e2UwYHR",
+ "buildId": "jjdnwftTfIE1O2UZqG15O",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_buildManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_ssgManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "uj0zAuCtQYmV-6e2UwYHR",
+ "buildId": "jjdnwftTfIE1O2UZqG15O",
"isFallback": false,
"gip": true
}
@@ -82,11 +82,11 @@
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_buildManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_ssgManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "uj0zAuCtQYmV-6e2UwYHR",
+ "buildId": "jjdnwftTfIE1O2UZqG15O",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_buildManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/uj0zAuCtQYmV-6e2UwYHR/_ssgManifest.js"
+ src="/_next/static/jjdnwftTfIE1O2UZqG15O/_ssgManifest.js"
async=""
></script>
</body>
Timer
approved these changes
Jan 18, 2021
Stats from current PRDefault Server Mode (Decrease detected ✓)General
Page Load Tests Overall decrease
|
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.724 | 1.735 | |
/ avg req/sec | 1449.78 | 1441.3 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.111 | 1.109 | 0 |
/error-in-render avg req/sec | 2251.18 | 2255.19 | +4.01 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 614 B | 614 B | ✓ |
link.html gzip | 621 B | 621 B | ✓ |
withRouter.html gzip | 608 B | 608 B | ✓ |
Overall change | 1.84 kB | 1.84 kB | ✓ |
Serverless Mode
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.3s | 10.3s | |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
677f882d2ed8..43e3.js gzip | 13.1 kB | 13.1 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-9e3e4e6..2023.js gzip | 6.63 kB | 6.63 kB | ✓ |
webpack-50be..df5b.js gzip | 751 B | 751 B | ✓ |
Overall change | 59.4 kB | 59.4 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-af..9390.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-2a09aa2..4a98.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-8b758..aef6.js gzip | 3.46 kB | 3.46 kB | ✓ |
hooks-c71ae4..70cd.js gzip | 887 B | 887 B | ✓ |
index-bbee2f..528b.js gzip | 227 B | 227 B | ✓ |
link-7faf09b..eba4.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..bf84.js gzip | 303 B | 303 B | ✓ |
withRouter-a..5826.js gzip | 302 B | 302 B | ✓ |
Overall change | 8.09 kB | 8.09 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
Overall change | 321 B | 321 B | ✓ |
Serverless bundles
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_error.js | 1 MB | 1 MB | ✓ |
404.html | 2.67 kB | 2.67 kB | ✓ |
hooks.html | 1.92 kB | 1.92 kB | ✓ |
index.js | 1 MB | 1 MB | ✓ |
link.js | 1.06 MB | 1.06 MB | ✓ |
routerDirect.js | 1.05 MB | 1.05 MB | ✓ |
withRouter.js | 1.05 MB | 1.05 MB | ✓ |
Overall change | 5.18 MB | 5.18 MB | ✓ |
Webpack 5 Mode (Increase detected ⚠️ )
General
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
buildDuration | 10.9s | 10.7s | -181ms |
nodeModulesSize | 77.6 MB | 77.6 MB | ✓ |
Page Load Tests Overall increase ✓
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 1.734 | 1.716 | -0.02 |
/ avg req/sec | 1441.83 | 1456.69 | +14.86 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.106 | 1.107 | 0 |
/error-in-render avg req/sec | 2259.93 | 2258.86 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
597-3bd7d6bd..868b.js gzip | 13 kB | 13 kB | ✓ |
778-d412f8e7..3ee1.js gzip | 6.56 kB | 6.56 kB | ✓ |
838-adcbad39..6e83.js gzip | 31.1 kB | 31.1 kB | ✓ |
framework.HASH.js gzip | 39.3 kB | 39.3 kB | ✓ |
main-6a6a792..6877.js gzip | 96 B | 96 B | ✓ |
webpack-e302..54e9.js gzip | 954 B | 954 B | ✓ |
Overall change | 91 kB | 91 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
polyfills-a0..538c.js gzip | 88 B | 88 B | ✓ |
Overall change | 88 B | 88 B | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_app-a5b2e84..33cf.js gzip | 1.26 kB | 1.26 kB | ✓ |
_error-6f1f9..5577.js gzip | 3.38 kB | 3.38 kB | ✓ |
hooks-725de8..0a15.js gzip | 904 B | 904 B | ✓ |
index-939503..6e1c.js gzip | 232 B | 232 B | ✓ |
link-e0cc871..fdbb.js gzip | 1.63 kB | 1.63 kB | ✓ |
routerDirect..9360.js gzip | 308 B | 308 B | ✓ |
withRouter-6..44ec.js gzip | 304 B | 304 B | ✓ |
Overall change | 8.02 kB | 8.02 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
_buildManifest.js gzip | 299 B | 299 B | ✓ |
Overall change | 299 B | 299 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js add/react-import-codemod | Change | |
---|---|---|---|
index.html gzip | 585 B | 585 B | ✓ |
link.html gzip | 592 B | 592 B | ✓ |
withRouter.html gzip | 581 B | 581 B | ✓ |
Overall change | 1.76 kB | 1.76 kB | ✓ |
Diffs
Diff for index.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/",
"query": {},
- "buildId": "b08jT3otq5_6sfSCHjhGA",
+ "buildId": "qeFI9gK3FDjnsn5NuuMHL",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_buildManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_ssgManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_ssgManifest.js"
async=""
></script>
</body>
Diff for link.html
@@ -48,7 +48,7 @@
"props": { "pageProps": {} },
"page": "/link",
"query": {},
- "buildId": "b08jT3otq5_6sfSCHjhGA",
+ "buildId": "qeFI9gK3FDjnsn5NuuMHL",
"isFallback": false,
"gip": true
}
@@ -82,11 +82,11 @@
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_buildManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_ssgManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_ssgManifest.js"
async=""
></script>
</body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
"props": { "pageProps": {} },
"page": "/withRouter",
"query": {},
- "buildId": "b08jT3otq5_6sfSCHjhGA",
+ "buildId": "qeFI9gK3FDjnsn5NuuMHL",
"isFallback": false,
"gip": true
}
@@ -77,11 +77,11 @@
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_buildManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_buildManifest.js"
async=""
></script>
<script
- src="/_next/static/b08jT3otq5_6sfSCHjhGA/_ssgManifest.js"
+ src="/_next/static/qeFI9gK3FDjnsn5NuuMHL/_ssgManifest.js"
async=""
></script>
</body>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously our automatic React injection approach injected
import React from 'react'
automatically whenever JSX was detected. The new official JSX transform solves this by enforcing importingReact
when it is used.This codemod automatically converted files that are using a "global React variable" to use
import React from 'react'