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

Replace __NEXT_SPR with __N_SSG Identifier #10090

Merged
merged 2 commits into from Jan 14, 2020

Conversation

Timer
Copy link
Member

@Timer Timer commented Jan 14, 2020

This pull request replaces __NEXT_SPR with a shorter and more accurate variant: __N_SSG.

__N_SSG cannot be minified, so it's important that it's short. Also, we rebranded SPR as SSG.

@Timer Timer added this to the 9.2.0 milestone Jan 14, 2020
@ijjk
Copy link
Member

ijjk commented Jan 14, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
buildDuration 11.7s 11.8s ⚠️ +133ms
nodeModulesSize 49 MB 49 MB -18 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +1 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..9881.js gzip 13.7 kB 13.7 kB ⚠️ +2 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.5 kB 67.5 kB ⚠️ +3 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
main-HASH.module.js gzip 4.18 kB 4.18 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB 12.5 kB ⚠️ +1 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.1 kB 62.1 kB ⚠️ +1 B
Legacy Client Bundles (polyfills)
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_app.js gzip 1.33 kB 1.33 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_app.module.js gzip 757 B 757 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.41 kB 7.41 kB
Client Build Manifests
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Rendered Page Sizes Overall increase ⚠️
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
index.html gzip 1.02 kB 1.02 kB ⚠️ +2 B
link.html gzip 1.03 kB 1.03 kB -1 B
withRouter.html gzip 1.02 kB 1.02 kB
Overall change 3.06 kB 3.07 kB ⚠️ +1 B

Diffs

Diff for de003c3a9d30..26.module.js
@@ -2203,7 +2203,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               }
 
               return this._getData(() =>
-                Component.__NEXT_SPR
+                Component.__N_SSG
                   ? this._getStaticData(as)
                   : this.getInitialProps(
                       Component, // we provide AppTree later so this needs to be `any`
Diff for de003c3a9d30..ba6a65095.js
@@ -1903,7 +1903,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 
                       return _this3
                         ._getData(function() {
-                          return Component.__NEXT_SPR
+                          return Component.__N_SSG
                             ? _this3._getStaticData(as)
                             : _this3.getInitialProps(
                                 Component, // we provide AppTree later so this needs to be `any`
Diff for main-HASH.js
@@ -475,7 +475,7 @@
                   (data.nextExport &&
                     ((0, _isDynamic.isDynamicRoute)(router.pathname) ||
                       location.search)) ||
-                  (Component.__NEXT_SPR && location.search)
+                  (Component.__N_SSG && location.search)
                 ) {
                   // update query on mount for exported pages
                   router.replace(
Diff for main-HASH.module.js
@@ -359,7 +359,7 @@
             (data.nextExport &&
               ((0, _isDynamic.isDynamicRoute)(router.pathname) ||
                 location.search)) ||
-            (Component.__NEXT_SPR && location.search)
+            (Component.__N_SSG && location.search)
           ) {
             // update query on mount for exported pages
             router.replace(
Diff for index.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      href="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -151,25 +151,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.fb89e23b574ba6a65095.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f292cf66b770b02858bf.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-78b2a56dbccd45cda1d4.js"
+      src="/_next/static/runtime/main-958c0bb4c1297de8088f.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      src="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      href="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -156,25 +156,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.fb89e23b574ba6a65095.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f292cf66b770b02858bf.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-78b2a56dbccd45cda1d4.js"
+      src="/_next/static/runtime/main-958c0bb4c1297de8088f.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      src="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      href="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -151,25 +151,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.fb89e23b574ba6a65095.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.f292cf66b770b02858bf.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.d9b3b214074605052c26.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.c5cfe57ad45f291e53e4.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-78b2a56dbccd45cda1d4.js"
+      src="/_next/static/runtime/main-958c0bb4c1297de8088f.js"
       defer=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-ec225f89ff10c0da79a6.module.js"
+      src="/_next/static/runtime/main-d00e2d63c88a481156d8.module.js"
       defer=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
buildDuration 12.6s 11.8s -804ms
nodeModulesSize 49 MB 49 MB -18 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
main-HASH.js gzip 5.11 kB 5.12 kB ⚠️ +1 B
webpack-HASH.js gzip 746 B 746 B
4952ddcd88e7..54d3.js gzip 4.68 kB 4.68 kB
commons.HASH.js gzip 4.06 kB 4.06 kB
de003c3a9d30..9881.js gzip 13.7 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..e54b.js gzip N/A 13.7 kB N/A
Overall change 67.5 kB 67.5 kB ⚠️ +1 B
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
main-HASH.module.js gzip 4.18 kB 4.18 kB
webpack-HASH..dule.js gzip 746 B 746 B
4952ddcd88e7..dule.js gzip 5.56 kB 5.56 kB
de003c3a9d30..dule.js gzip 12.5 kB N/A N/A
framework.HA..dule.js gzip 39.1 kB 39.1 kB
de003c3a9d30..dule.js gzip N/A 12.5 kB N/A
Overall change 62.1 kB 62.1 kB
Legacy Client Bundles (polyfills)
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
polyfills-HASH.js gzip 4.76 kB 4.76 kB
Overall change 4.76 kB 4.76 kB
Client Pages
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_app.js gzip 1.33 kB 1.33 kB
_error.js gzip 4.07 kB 4.07 kB
hooks.js gzip 779 B 779 B
index.js gzip 222 B 222 B
link.js gzip 2.9 kB 2.9 kB
routerDirect.js gzip 283 B 283 B
withRouter.js gzip 282 B 282 B
Overall change 9.87 kB 9.87 kB
Client Pages Modern
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_app.module.js gzip 757 B 757 B
_error.module.js gzip 3.06 kB 3.06 kB
hooks.module.js gzip 371 B 371 B
index.module.js gzip 212 B 212 B
link.module.js gzip 2.47 kB 2.47 kB
routerDirect..dule.js gzip 273 B 273 B
withRouter.m..dule.js gzip 272 B 272 B
Overall change 7.41 kB 7.41 kB
Client Build Manifests
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_buildManifest.js gzip 61 B 61 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 122 B 122 B
Serverless bundles Overall increase ⚠️
zeit/next.js canary Timer/next.js s/__NEXT_SPR/__N_SSG Change
_error.js gzip 77.8 kB 77.8 kB ⚠️ +4 B
hooks.html gzip 1.05 kB 1.06 kB ⚠️ +1 B
index.js gzip 78 kB 78 kB ⚠️ +3 B
link.js gzip 80.4 kB 80.4 kB ⚠️ +3 B
routerDirect.js gzip 78.1 kB 78.1 kB ⚠️ +3 B
withRouter.js gzip 78.1 kB 78.1 kB ⚠️ +3 B
Overall change 393 kB 393 kB ⚠️ +17 B

Commit: f8b4330

@Timer Timer merged commit 2d76c4a into vercel:canary Jan 14, 2020
@Timer Timer deleted the s/__NEXT_SPR/__N_SSG branch January 14, 2020 19:40
@vercel vercel locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants