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

Ensure export only triggers when static pages are present #22996

Merged
merged 4 commits into from
Mar 12, 2021

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Mar 11, 2021

This makes sure we don't trigger the export step if we aren't exporting any static pages during a build. This also adds an invariant to ensure we don't attempt creating a progress with 0 items.

Fixes: #22994

@ijjk

This comment has been minimized.

@ijjk ijjk marked this pull request as ready for review March 11, 2021 23:54
@ijjk
Copy link
Member Author

ijjk commented Mar 12, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 12.4s 12.4s ⚠️ +26ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
/ failed reqs 0 0
/ total time (seconds) 2.263 2.322 ⚠️ +0.06
/ avg req/sec 1104.78 1076.67 ⚠️ -28.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.67 1.615 -0.05
/error-in-render avg req/sec 1497.26 1548.3 +51.04
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
index.html gzip 611 B 611 B
link.html gzip 619 B 619 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 14.2s 14.5s ⚠️ +287ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_error.js 1.02 MB 1.02 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB
link.js 1.08 MB 1.08 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 14.7s 14.6s -118ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
/ failed reqs 0 0
/ total time (seconds) 2.326 2.319 -0.01
/ avg req/sec 1074.75 1078.12 +3.37
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.734 1.565 -0.17
/error-in-render avg req/sec 1441.53 1597.08 +155.55
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-0c62a59..94b7.js gzip 1.26 kB 1.26 kB
_error-97d24..ed28.js gzip 3.38 kB 3.38 kB
amp-2926e4c2..9ccc.js gzip 536 B 536 B
hooks-1ed65b..8908.js gzip 902 B 902 B
index-6259b6..77d8.js gzip 230 B 230 B
link-b722682..14a4.js gzip 1.65 kB 1.65 kB
routerDirect..862a.js gzip 306 B 306 B
withRouter-4..76fd.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
index.html gzip 585 B 585 B
link.html gzip 593 B 593 B
withRouter.html gzip 579 B 579 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "prkVe-53V83VPE6lA56ka",
+        "buildId": "fI-sfn4lI9OEozhVpY-I2",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_buildManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_ssgManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "prkVe-53V83VPE6lA56ka",
+        "buildId": "fI-sfn4lI9OEozhVpY-I2",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_buildManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_ssgManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "prkVe-53V83VPE6lA56ka",
+        "buildId": "fI-sfn4lI9OEozhVpY-I2",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_buildManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/prkVe-53V83VPE6lA56ka/_ssgManifest.js"
+      src="/_next/static/fI-sfn4lI9OEozhVpY-I2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 23735e8

@ijjk
Copy link
Member Author

ijjk commented Mar 12, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 12.7s 13.1s ⚠️ +322ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
/ failed reqs 0 0
/ total time (seconds) 2.275 2.367 ⚠️ +0.09
/ avg req/sec 1098.85 1056.01 ⚠️ -42.84
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.713 1.582 -0.13
/error-in-render avg req/sec 1459.48 1580.11 +120.63
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
index.html gzip 611 B 611 B
link.html gzip 619 B 619 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 14.5s 14.9s ⚠️ +320ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
677f882d2ed8..a2e7.js gzip 13.4 kB 13.4 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.65 kB 6.65 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-fde3324..9dd1.js gzip 1.28 kB 1.28 kB
_error-af59f..582f.js gzip 3.46 kB 3.46 kB
amp-9716187d..0aa8.js gzip 536 B 536 B
hooks-107e90..74c7.js gzip 888 B 888 B
index-ac435c..ecf2.js gzip 227 B 227 B
link-c0d2c96..de48.js gzip 1.67 kB 1.67 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.66 kB 8.66 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 347 B 347 B
Overall change 347 B 347 B
Serverless bundles
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_error.js 1.02 MB 1.02 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.02 MB 1.02 MB
link.js 1.08 MB 1.08 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
buildDuration 15.3s 15.2s -78ms
nodeModulesSize 42.8 MB 42.8 MB ⚠️ +1.56 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
/ failed reqs 0 0
/ total time (seconds) 2.345 2.346 0
/ avg req/sec 1066.09 1065.44 ⚠️ -0.65
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.594 1.639 ⚠️ +0.04
/error-in-render avg req/sec 1568.02 1525.14 ⚠️ -42.88
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
597-2bc2376a..203d.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 60.2 kB 60.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/no-static-pages 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 ijjk/next.js fix/no-static-pages Change
_app-0c62a59..94b7.js gzip 1.26 kB 1.26 kB
_error-97d24..ed28.js gzip 3.38 kB 3.38 kB
amp-2926e4c2..9ccc.js gzip 536 B 536 B
hooks-1ed65b..8908.js gzip 902 B 902 B
index-6259b6..77d8.js gzip 230 B 230 B
link-b722682..14a4.js gzip 1.65 kB 1.65 kB
routerDirect..862a.js gzip 306 B 306 B
withRouter-4..76fd.js gzip 302 B 302 B
Overall change 8.57 kB 8.57 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js fix/no-static-pages Change
index.html gzip 585 B 585 B
link.html gzip 593 B 593 B
withRouter.html gzip 579 B 579 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "kQVsIa4hANmLdRZYB33lJ",
+        "buildId": "u_aL18oWdiGnOXKfP8T5w",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_buildManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_ssgManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "kQVsIa4hANmLdRZYB33lJ",
+        "buildId": "u_aL18oWdiGnOXKfP8T5w",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_buildManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_ssgManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "kQVsIa4hANmLdRZYB33lJ",
+        "buildId": "u_aL18oWdiGnOXKfP8T5w",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_buildManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/kQVsIa4hANmLdRZYB33lJ/_ssgManifest.js"
+      src="/_next/static/u_aL18oWdiGnOXKfP8T5w/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: ff2c946

This was referenced Mar 16, 2021
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ =] info - Generating static pages (0/0) never completes
2 participants