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

Add runtime to hotUpdateMainFilename #26256

Merged
merged 14 commits into from Jun 18, 2021

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Jun 17, 2021

Updates the hotUpdateChunk to include [runtime] for web workers support.

Fixes #26152
Fixes #19865
Fixes #26144

Bug

  • Related issues linked using fixes #number
  • Integration tests added

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.

Documentation / Examples

  • Make sure the linting passes

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

Copy link

@adamjkester5 adamjkester5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't like

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

ijjk
ijjk previously approved these changes Jun 17, 2021
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@timneutkens
Copy link
Member Author

Reported @adamjkester5 as a spam bot.

@ijjk
Copy link
Member

ijjk commented Jun 18, 2021

Failing test suites

Commit: 8d0b5ec

test/integration/amphtml/test/index.test.js

  • AMP Usage > AMP dev mode > should not reload unless the page is edited for an AMP page
Expand output

● AMP Usage › AMP dev mode › should not reload unless the page is edited for an AMP page

expect(received).toBe(expected) // Object.is equality

Expected: "1624027037813"
Received: "1624027048424"

  425 |         while (i < checks) {
  426 |           const curText = await browser.elementByCss('span').text()
> 427 |           expect(curText).toBe(origDate)
      |                           ^
  428 |           await waitFor(1000)
  429 |           i++
  430 |         }

  at Object.<anonymous> (integration/amphtml/test/index.test.js:427:27)

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jun 18, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
buildDuration 13.6s 13.4s -196ms
buildDurationCached 3.2s 3.4s ⚠️ +227ms
nodeModulesSize 49.2 MB 49.2 MB ⚠️ +670 B
Page Load Tests Overall increase ✓
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
/ failed reqs 0 0
/ total time (seconds) 2.412 2.358 -0.05
/ avg req/sec 1036.67 1060.1 +23.43
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.425 1.37 -0.05
/error-in-render avg req/sec 1754.45 1825.41 +70.96
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
framework-HASH.js gzip 42 kB 42 kB
main-HASH.js gzip 20.2 kB 20.2 kB
webpack-HASH.js gzip 804 B 810 B ⚠️ +6 B
Overall change 63 kB 63 kB ⚠️ +6 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name 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 timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_app-HASH.js gzip 801 B 801 B
_error-HASH.js gzip 3.17 kB 3.17 kB
amp-HASH.js gzip 527 B 527 B
css-HASH.js gzip 330 B 330 B
hooks-HASH.js gzip 903 B 903 B
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.65 kB 1.65 kB
routerDirect..HASH.js gzip 322 B 322 B
withRouter-HASH.js gzip 320 B 320 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 8.41 kB 8.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_buildManifest.js gzip 392 B 392 B
Overall change 392 B 392 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
index.html gzip 522 B 522 B
link.html gzip 535 B 532 B -3 B
withRouter.html gzip 516 B 516 B
Overall change 1.57 kB 1.57 kB -3 B

Diffs

Diff for webpack-HASH.js
@@ -178,7 +178,7 @@
   /******/
 
   /******/ /******/ !(function() {
-    /******/ __webpack_require__.p = "";
+    /******/ __webpack_require__.p = "/_next/";
     /******/
   })(); /* webpack/runtime/jsonp chunk loading */
   /******/
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-16fb5e52861014c05b14.js"
+      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
       defer=""
     ></script>
     <script
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-16fb5e52861014c05b14.js"
+      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
       defer=""
     ></script>
     <script
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-78af6fe89161f65f5762.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-16fb5e52861014c05b14.js"
+      src="/_next/static/chunks/webpack-c14d70924bc10b27e8cb.js"
       defer=""
     ></script>
     <script

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
buildDuration 15.3s 15.3s ⚠️ +8ms
buildDurationCached 4.5s 4.4s -39ms
nodeModulesSize 49.2 MB 49.2 MB ⚠️ +670 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
framework-HASH.js gzip 42 kB 42 kB
main-HASH.js gzip 20.2 kB 20.2 kB
webpack-HASH.js gzip 804 B 810 B ⚠️ +6 B
Overall change 63 kB 63 kB ⚠️ +6 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name 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 timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_app-HASH.js gzip 801 B 801 B
_error-HASH.js gzip 3.17 kB 3.17 kB
amp-HASH.js gzip 527 B 527 B
css-HASH.js gzip 330 B 330 B
hooks-HASH.js gzip 903 B 903 B
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.65 kB 1.65 kB
routerDirect..HASH.js gzip 322 B 322 B
withRouter-HASH.js gzip 320 B 320 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 8.41 kB 8.41 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_buildManifest.js gzip 392 B 392 B
Overall change 392 B 392 B
Serverless bundles
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_error.js 16.9 kB 16.9 kB
404.html 1.98 kB 1.98 kB
500.html 1.96 kB 1.96 kB
amp.amp.html 10.8 kB 10.8 kB
amp.html 1.17 kB 1.17 kB
css.html 1.35 kB 1.35 kB
hooks.html 1.23 kB 1.23 kB
index.js 17.2 kB 17.2 kB
link.js 17.5 kB 17.5 kB
routerDirect.js 17.3 kB 17.3 kB
withRouter.js 17.3 kB 17.3 kB
Overall change 105 kB 105 kB

Webpack 4 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
buildDuration 12.1s 12s -163ms
buildDurationCached 4.9s 4.8s -74ms
nodeModulesSize 49.2 MB 49.2 MB ⚠️ +670 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
/ failed reqs 0 0
/ total time (seconds) 2.482 2.387 -0.1
/ avg req/sec 1007.39 1047.49 +40.1
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.357 1.388 ⚠️ +0.03
/error-in-render avg req/sec 1841.95 1801.79 ⚠️ -40.16
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
677f882d2ed8..HASH.js gzip 13.3 kB 13.3 kB
framework.HASH.js gzip 41.8 kB 41.8 kB
main-HASH.js gzip 7.99 kB 7.99 kB
webpack-HASH.js gzip 751 B 757 B ⚠️ +6 B
Overall change 63.8 kB 63.8 kB ⚠️ +6 B
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name 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 timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_app-HASH.js gzip 1.07 kB 1.07 kB
_error-HASH.js gzip 3.84 kB 3.84 kB
amp-HASH.js gzip 536 B 536 B
css-HASH.js gzip 333 B 333 B
hooks-HASH.js gzip 910 B 910 B
index-HASH.js gzip 227 B 227 B
link-HASH.js gzip 1.64 kB 1.64 kB
routerDirect..HASH.js gzip 295 B 295 B
withRouter-HASH.js gzip 292 B 292 B
e025d2764813..52f.css gzip 125 B 125 B
Overall change 9.28 kB 9.28 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
_buildManifest.js gzip 420 B 420 B
Overall change 420 B 420 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary timneutkens/next.js fix/update-runtime-hot-chunk-name Change
index.html gzip 566 B 566 B
link.html gzip 579 B 579 B
withRouter.html gzip 558 B 559 B ⚠️ +1 B
Overall change 1.7 kB 1.7 kB ⚠️ +1 B

Diffs

Diff for webpack-HASH.js
@@ -191,7 +191,7 @@
     return Object.prototype.hasOwnProperty.call(object, property);
   }; // __webpack_public_path__
   /******/
-  /******/ /******/ __webpack_require__.p = "";
+  /******/ /******/ __webpack_require__.p = "/_next/";
   /******/
   /******/ var jsonpArray = (window["webpackJsonp_N_E"] =
     window["webpackJsonp_N_E"] || []);
Diff for index.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-8e6ada07653aff5607ec.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-becabbdf5d4df28a038e.js"
+      src="/_next/static/chunks/webpack-ed3764559349f42b0235.js"
       defer=""
     ></script>
     <script
Diff for link.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-8e6ada07653aff5607ec.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-becabbdf5d4df28a038e.js"
+      src="/_next/static/chunks/webpack-ed3764559349f42b0235.js"
       defer=""
     ></script>
     <script
Diff for withRouter.html
@@ -11,7 +11,7 @@
       src="/_next/static/chunks/polyfills-8e6ada07653aff5607ec.js"
     ></script>
     <script
-      src="/_next/static/chunks/webpack-becabbdf5d4df28a038e.js"
+      src="/_next/static/chunks/webpack-ed3764559349f42b0235.js"
       defer=""
     ></script>
     <script
Commit: c715d51

@kodiakhq kodiakhq bot merged commit 88ed526 into vercel:canary Jun 18, 2021
@timneutkens timneutkens deleted the fix/update-runtime-hot-chunk-name branch June 18, 2021 17:39
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Jun 24, 2021
Updates the hotUpdateChunk to include `[runtime]` for web workers support.

Fixes vercel#26152
Fixes vercel#19865
Fixes vercel#26144

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] 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.
Projects
None yet
4 participants