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

Allow for shortened names for certain items #9949

Merged
merged 3 commits into from Jan 4, 2020

Conversation

timneutkens
Copy link
Member

No description provided.

@ijjk
Copy link
Member

ijjk commented Jan 4, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
buildDuration 13.3s 13.1s -187ms
nodeModulesSize 48.9 MB 48.9 MB -672 B
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
main-HASH.js gzip 5.2 kB 5.13 kB -68 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..2f75.js gzip 13.7 kB 13.7 kB -36 B
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 67.6 kB 67.5 kB -104 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
main-HASH.module.js gzip 4.25 kB 4.19 kB -52 B
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 -36 B
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 62.2 kB 62.1 kB -88 B
Legacy Client Bundles (polyfills)
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter Change
index.html gzip 1.02 kB 1.02 kB ⚠️ +1 B
link.html gzip 1.03 kB 1.03 kB ⚠️ +1 B
withRouter.html gzip 1.01 kB 1.02 kB ⚠️ +3 B
Overall change 3.06 kB 3.07 kB ⚠️ +5 B

Diffs

Diff for de003c3a9d30..85beee5cf.js
@@ -1703,7 +1703,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                       _this2.isSsr = false
                     } // marking route changes as a navigation start entry
 
-                    if (utils_1.SUPPORTS_PERFORMANCE_USER_TIMING) {
+                    if (utils_1.ST) {
                       performance.mark('routeChange')
                     } // If url and as provided as an object representation,
                     // we'll format them into the string version here.
@@ -2500,9 +2500,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       exports.formatWithValidation = formatWithValidation
-      exports.SUPPORTS_PERFORMANCE = typeof performance !== 'undefined'
-      exports.SUPPORTS_PERFORMANCE_USER_TIMING =
-        exports.SUPPORTS_PERFORMANCE &&
+      exports.SP = typeof performance !== 'undefined'
+      exports.ST =
+        exports.SP &&
         typeof performance.mark === 'function' &&
         typeof performance.measure === 'function'
Diff for de003c3a9d30..c0.module.js
@@ -2026,7 +2026,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
               this.isSsr = false
             } // marking route changes as a navigation start entry
 
-            if (utils_1.SUPPORTS_PERFORMANCE_USER_TIMING) {
+            if (utils_1.ST) {
               performance.mark('routeChange')
             } // If url and as provided as an object representation,
             // we'll format them into the string version here.
@@ -2586,9 +2586,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
       }
 
       exports.formatWithValidation = formatWithValidation
-      exports.SUPPORTS_PERFORMANCE = typeof performance !== 'undefined'
-      exports.SUPPORTS_PERFORMANCE_USER_TIMING =
-        exports.SUPPORTS_PERFORMANCE &&
+      exports.SP = typeof performance !== 'undefined'
+      exports.ST =
+        exports.SP &&
         typeof performance.mark === 'function' &&
         typeof performance.measure === 'function'
Diff for main-HASH.js
@@ -347,7 +347,7 @@
       exports.renderError = renderError
       exports[
         'default'
-      ] = exports.emitter = exports.ErrorComponent = exports.router = exports.version = void 0
+      ] = exports.emitter = exports.router = exports.version = void 0
 
       var _asyncToGenerator2 = _interopRequireDefault(
         __webpack_require__('+oT+')
@@ -438,7 +438,6 @@
       var router
       exports.router = router
       var ErrorComponent
-      exports.ErrorComponent = ErrorComponent
       var Component
       var App, onPerfEntry
 
@@ -662,7 +661,6 @@
                                 Component: Component,
                                 props: props,
                                 err: err,
-                                emitter: emitter,
                               })
                             },
                           }
@@ -676,7 +674,6 @@
                           Component: Component,
                           props: props,
                           err: initialErr,
-                          emitter: emitter,
                         }
                         render(renderCtx)
                         return _context.abrupt('return', emitter)
@@ -798,7 +795,7 @@
                     return pageLoader.loadPage('/_error')
 
                   case 7:
-                    exports.ErrorComponent = ErrorComponent = _context3.sent
+                    ErrorComponent = _context3.sent
                     // In production we do a normal render with the `ErrorComponent` as component.
                     // If we've gotten here upon initial render, we can use the props from the server.
                     // Otherwise, we need to call `getInitialProps` on `App` before mounting.
@@ -859,7 +856,7 @@
 
       function renderReactElement(reactEl, domEl) {
         // mark start of hydrate/render
-        if (_utils.SUPPORTS_PERFORMANCE_USER_TIMING) {
+        if (_utils.ST) {
           performance.mark('beforeRender')
         }
 
@@ -876,7 +873,7 @@
           }
         }
 
-        if (onPerfEntry && _utils.SUPPORTS_PERFORMANCE_USER_TIMING) {
+        if (onPerfEntry && _utils.ST) {
           if (!(PerformanceObserver in window)) {
             window.addEventListener('load', function() {
               performance.getEntriesByType('paint').forEach(onPerfEntry)
@@ -893,7 +890,7 @@
       }
 
       function markHydrateComplete() {
-        if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return
+        if (!_utils.ST) return
         performance.mark('afterHydrate') // mark end of hydration
 
         performance.measure(
@@ -912,7 +909,7 @@
       }
 
       function markRenderComplete() {
-        if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return
+        if (!_utils.ST) return
         performance.mark('afterRender') // mark end of render
 
         var navStartEntries = performance.getEntriesByName(
Diff for main-HASH.module.js
@@ -250,7 +250,7 @@
       exports.__esModule = true
       exports.render = render
       exports.renderError = renderError
-      exports.default = exports.emitter = exports.ErrorComponent = exports.router = exports.version = void 0
+      exports.default = exports.emitter = exports.router = exports.version = void 0
 
       var _asyncToGenerator2 = _interopRequireDefault(
         __webpack_require__('+oT+')
@@ -340,7 +340,6 @@
       var router
       exports.router = router
       var ErrorComponent
-      exports.ErrorComponent = ErrorComponent
       var Component
       var App, onPerfEntry
 
@@ -468,7 +467,6 @@
                     Component,
                     props,
                     err,
-                    emitter,
                   })
                 },
               }
@@ -482,7 +480,6 @@
               Component,
               props,
               err: initialErr,
-              emitter,
             }
             render(renderCtx)
             return emitter
@@ -537,9 +534,7 @@
           } // Make sure we log the error to the console, otherwise users can't track down issues.
 
           console.error(err)
-          exports.ErrorComponent = ErrorComponent = yield pageLoader.loadPage(
-            '/_error'
-          ) // In production we do a normal render with the `ErrorComponent` as component.
+          ErrorComponent = yield pageLoader.loadPage('/_error') // In production we do a normal render with the `ErrorComponent` as component.
           // If we've gotten here upon initial render, we can use the props from the server.
           // Otherwise, we need to call `getInitialProps` on `App` before mounting.
 
@@ -575,7 +570,7 @@
 
       function renderReactElement(reactEl, domEl) {
         // mark start of hydrate/render
-        if (_utils.SUPPORTS_PERFORMANCE_USER_TIMING) {
+        if (_utils.ST) {
           performance.mark('beforeRender')
         }
 
@@ -592,7 +587,7 @@
           }
         }
 
-        if (onPerfEntry && _utils.SUPPORTS_PERFORMANCE_USER_TIMING) {
+        if (onPerfEntry && _utils.ST) {
           if (!(PerformanceObserver in window)) {
             window.addEventListener('load', () => {
               performance.getEntriesByType('paint').forEach(onPerfEntry)
@@ -609,7 +604,7 @@
       }
 
       function markHydrateComplete() {
-        if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return
+        if (!_utils.ST) return
         performance.mark('afterHydrate') // mark end of hydration
 
         performance.measure(
@@ -628,7 +623,7 @@
       }
 
       function markRenderComplete() {
-        if (!_utils.SUPPORTS_PERFORMANCE_USER_TIMING) return
+        if (!_utils.ST) return
         performance.mark('afterRender') // mark end of render
 
         var navStartEntries = performance.getEntriesByName(
Diff for index.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      href="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -151,25 +151,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2f93bd9bec75d46f1a1e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-caad6b102feffc89a759.js"
+      src="/_next/static/runtime/main-613df2e71a6603a6de29.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      src="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      href="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -156,25 +156,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2f93bd9bec75d46f1a1e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-caad6b102feffc89a759.js"
+      src="/_next/static/runtime/main-613df2e71a6603a6de29.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      src="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -39,13 +39,13 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      href="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       as="script"
       crossorigin="anonymous"
     />
     <link
       rel="preload"
-      href="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      href="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -151,25 +151,25 @@
       type="module"
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.1af4f3a4b6085beee5cf.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.2f93bd9bec75d46f1a1e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.71ebf5a827dafc8a9ac0.module.js"
+      src="/_next/static/chunks/de003c3a9d308750aa009870a5926f9b18ab31f4.bc6579cf6308df6d2e33.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
     ></script
     ><script
-      src="/_next/static/runtime/main-caad6b102feffc89a759.js"
+      src="/_next/static/runtime/main-613df2e71a6603a6de29.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script
     ><script
-      src="/_next/static/runtime/main-398c93494695cca36caf.module.js"
+      src="/_next/static/runtime/main-db87196a5a4d0c2e6513.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
buildDuration 14s 13.7s -293ms
nodeModulesSize 48.9 MB 48.9 MB -672 B
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
main-HASH.js gzip 5.2 kB 5.13 kB -68 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..2f75.js gzip 13.7 kB N/A N/A
framework.HASH.js gzip 39.1 kB 39.1 kB
de003c3a9d30..4cf7.js gzip N/A 13.7 kB N/A
Overall change 67.6 kB 67.5 kB -68 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
main-HASH.module.js gzip 4.25 kB 4.19 kB -52 B
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.2 kB 62.1 kB -52 B
Legacy Client Bundles (polyfills)
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 timneutkens/next.js fix/remove-duplicate-emitter 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 decrease ✓
zeit/next.js canary timneutkens/next.js fix/remove-duplicate-emitter Change
_error.js gzip 77.8 kB 77.8 kB -33 B
hooks.html gzip 1.05 kB 1.06 kB ⚠️ +3 B
index.js gzip 78 kB 78 kB -31 B
link.js gzip 80.4 kB 80.4 kB -27 B
routerDirect.js gzip 78.1 kB 78.1 kB -33 B
withRouter.js gzip 78.2 kB 78.1 kB -32 B
Overall change 394 kB 393 kB -153 B

Commit: ea4889d

@Timer Timer merged commit 32ec4f6 into vercel:canary Jan 4, 2020
@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

3 participants