Skip to content
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

Switch Create Next App default template to use next/image #24076

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

garmeeh
Copy link
Contributor

@garmeeh garmeeh commented Apr 14, 2021

Follow PR to #23887 to add next/image.

Only other change was wrapping the image in a span to allow for the margin that was previously on the actual <img>

Documentation / Examples

  • Make sure the linting passes

@ijjk ijjk added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Apr 14, 2021
@ijjk
Copy link
Member

ijjk commented Apr 14, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 15.8s 15.8s -74ms
nodeModulesSize 46.2 MB 46.2 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
/ failed reqs 0 0
/ total time (seconds) 2.78 2.837 ⚠️ +0.06
/ avg req/sec 899.38 881.14 ⚠️ -18.24
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.632 1.621 -0.01
/error-in-render avg req/sec 1531.49 1541.83 +10.34
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-9c11a899..1178.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
index.html gzip 609 B 609 B
link.html gzip 616 B 616 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Serverless Mode
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 19.8s 19.9s ⚠️ +147ms
nodeModulesSize 46.2 MB 46.2 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-9c11a899..1178.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Serverless bundles
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_error.js 1.39 MB 1.39 MB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.39 MB 1.39 MB
link.js 1.45 MB 1.45 MB
routerDirect.js 1.44 MB 1.44 MB
withRouter.js 1.44 MB 1.44 MB
Overall change 7.14 MB 7.14 MB

Webpack 5 Mode (Decrease detected ✓)
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 15.8s 16s ⚠️ +120ms
nodeModulesSize 46.2 MB 46.2 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
/ failed reqs 0 0
/ total time (seconds) 2.839 2.847 ⚠️ +0.01
/ avg req/sec 880.6 878.12 ⚠️ -2.48
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.632 1.644 ⚠️ +0.01
/error-in-render avg req/sec 1531.75 1520.86 ⚠️ -10.89
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-9c11a899..1178.js gzip 7.05 kB 7.05 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-5cc66b2..6f03.js gzip 1.3 kB 1.3 kB
_error-55112..054d.js gzip 3.68 kB 3.68 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-dd34d9b..0ade.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
index.html gzip 609 B 609 B
link.html gzip 616 B 616 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "a4MsD8xdUsr_secqc2X0I",
+        "buildId": "m54HR0ZCbbQrwdpMz3jJo",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_buildManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_ssgManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -53,7 +53,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "a4MsD8xdUsr_secqc2X0I",
+        "buildId": "m54HR0ZCbbQrwdpMz3jJo",
         "isFallback": false,
         "gip": true
       }
@@ -91,11 +91,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_buildManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_ssgManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "a4MsD8xdUsr_secqc2X0I",
+        "buildId": "m54HR0ZCbbQrwdpMz3jJo",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_buildManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/a4MsD8xdUsr_secqc2X0I/_ssgManifest.js"
+      src="/_next/static/m54HR0ZCbbQrwdpMz3jJo/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: ff0fe1a

@ijjk
Copy link
Member

ijjk commented Apr 15, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 13.8s 14.3s ⚠️ +427ms
buildDurationCached 4.3s 4.3s -7ms
nodeModulesSize 46.2 MB 46.2 MB
Page Load Tests Overall increase ✓
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
/ failed reqs 0 0
/ total time (seconds) 2.457 2.477 ⚠️ +0.02
/ avg req/sec 1017.54 1009.12 ⚠️ -8.42
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.268 1.239 -0.03
/error-in-render avg req/sec 1971.76 2018.3 +46.54
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
597-HASH.js gzip 13.3 kB 13.3 kB
778-HASH.js gzip 7.05 kB 7.05 kB
framework-HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-HASH.js gzip 1.3 kB 1.3 kB
_error-HASH.js gzip 3.68 kB 3.68 kB
amp-HASH.js gzip 558 B 558 B
hooks-HASH.js gzip 924 B 924 B
index-HASH.js gzip 243 B 243 B
link-HASH.js gzip 1.66 kB 1.66 kB
routerDirect..HASH.js gzip 336 B 336 B
withRouter-HASH.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
index.html gzip 609 B 609 B
link.html gzip 615 B 615 B
withRouter.html gzip 603 B 603 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Decrease detected ✓)
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 17.1s 17.4s ⚠️ +270ms
buildDurationCached 6.3s 6.3s -51ms
nodeModulesSize 46.2 MB 46.2 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
597-HASH.js gzip 13.3 kB 13.3 kB
778-HASH.js gzip 7.05 kB 7.05 kB
framework-HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-HASH.js gzip 1.3 kB 1.3 kB
_error-HASH.js gzip 3.68 kB 3.68 kB
amp-HASH.js gzip 558 B 558 B
hooks-HASH.js gzip 924 B 924 B
index-HASH.js gzip 243 B 243 B
link-HASH.js gzip 1.66 kB 1.66 kB
routerDirect..HASH.js gzip 336 B 336 B
withRouter-HASH.js gzip 334 B 334 B
Overall change 9.03 kB 9.03 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Serverless bundles Overall decrease ✓
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_error.js 1.39 MB 1.39 MB
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.39 MB 1.39 MB
link.js 1.45 MB 1.45 MB
routerDirect.js 1.44 MB 1.44 MB -2 B
withRouter.js 1.44 MB 1.44 MB
Overall change 7.14 MB 7.14 MB -2 B

Webpack 4 Mode (Increase detected ⚠️)
General
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
buildDuration 11.9s 11.5s -328ms
buildDurationCached 4.8s 4.8s -39ms
nodeModulesSize 46.2 MB 46.2 MB
Page Load Tests Overall increase ✓
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
/ failed reqs 0 0
/ total time (seconds) 2.442 2.431 -0.01
/ avg req/sec 1023.93 1028.33 +4.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.256 1.176 -0.08
/error-in-render avg req/sec 1989.67 2125.75 +136.08
Client Bundles (main, webpack, commons)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
677f882d2ed8..HASH.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 7.12 kB 7.12 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image 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 garmeeh/next.js create-next-app-use-next-image Change
_app-HASH.js gzip 1.28 kB 1.28 kB
_error-HASH.js gzip 3.71 kB 3.71 kB
amp-HASH.js gzip 536 B 536 B
hooks-HASH.js gzip 888 B 888 B
index-HASH.js gzip 227 B 227 B
link-HASH.js gzip 1.64 kB 1.64 kB
routerDirect..HASH.js gzip 303 B 303 B
withRouter-HASH.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes
vercel/next.js canary garmeeh/next.js create-next-app-use-next-image Change
index.html gzip 613 B 613 B
link.html gzip 620 B 620 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB
Commit: 99a22f6

@kodiakhq kodiakhq bot merged commit c3d06a2 into vercel:canary Apr 15, 2021
SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
Follow PR to vercel#23887 to add next/image.

Only other change was wrapping the image in a span to allow for the margin that was previously on the actual `<img>`

## Documentation / Examples

- [x] Make sure the linting passes
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants