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

upgrade to webpack 5.31.0 #23776

Merged
merged 1 commit into from
Apr 7, 2021
Merged

upgrade to webpack 5.31.0 #23776

merged 1 commit into from
Apr 7, 2021

Conversation

sokra
Copy link
Member

@sokra sokra commented Apr 7, 2021

  • fixes a bundle size regression from webpack 4 to 5
  • fixes these warnings during resolving build dependencies for packages using exports

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
Copy link
Member

ijjk commented Apr 7, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 13.4s 13.6s ⚠️ +207ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.1 kB
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js webpack/5.31 Change
/ failed reqs 0 0
/ total time (seconds) 2.879 2.812 -0.07
/ avg req/sec 868.49 888.9 +20.41
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.683 1.648 -0.04
/error-in-render avg req/sec 1485.67 1516.85 +31.18
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
677f882d2ed8..e6c6.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 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-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js webpack/5.31 Change
index.html gzip 613 B 613 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 15.5s 15.3s -166ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.1 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
677f882d2ed8..e6c6.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 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-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles
vercel/next.js canary vercel/next.js webpack/5.31 Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB
routerDirect.js 1.42 MB 1.42 MB
withRouter.js 1.42 MB 1.42 MB
Overall change 7.01 MB 7.01 MB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 15.9s 15.7s -284ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.1 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
/ failed reqs 0 0
/ total time (seconds) 2.789 2.869 ⚠️ +0.08
/ avg req/sec 896.4 871.42 ⚠️ -24.98
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.644 1.629 -0.01
/error-in-render avg req/sec 1520.72 1534.99 +14.27
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-5cc798ac..5c25.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js webpack/5.31 Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

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

@ijjk
Copy link
Member

ijjk commented Apr 7, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 11.4s 11.5s ⚠️ +90ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.16 kB
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js webpack/5.31 Change
/ failed reqs 0 0
/ total time (seconds) 2.372 2.37 0
/ avg req/sec 1054.11 1054.94 +0.83
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.276 1.219 -0.06
/error-in-render avg req/sec 1959.8 2051.26 +91.46
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
677f882d2ed8..e6c6.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 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-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js webpack/5.31 Change
index.html gzip 613 B 613 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 13.5s 13.6s ⚠️ +47ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.16 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
677f882d2ed8..e6c6.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_app-8fbabfc..6440.js gzip 1.28 kB 1.28 kB
_error-d07ca..ef4d.js gzip 3.71 kB 3.71 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-c31053f..c329.js gzip 1.64 kB 1.64 kB
routerDirect..dc9d.js gzip 303 B 303 B
withRouter-6..0e02.js gzip 302 B 302 B
Overall change 8.89 kB 8.89 kB
Client Build Manifests
vercel/next.js canary vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 371 B 371 B
Overall change 371 B 371 B
Serverless bundles
vercel/next.js canary vercel/next.js webpack/5.31 Change
_error.js 1.37 MB 1.37 MB
404.html 2.67 kB 2.67 kB
500.html 2.65 kB 2.65 kB
amp.amp.html 10.7 kB 10.7 kB
amp.html 1.86 kB 1.86 kB
hooks.html 1.92 kB 1.92 kB
index.js 1.37 MB 1.37 MB
link.js 1.42 MB 1.42 MB
routerDirect.js 1.42 MB 1.42 MB
withRouter.js 1.42 MB 1.42 MB
Overall change 7.01 MB 7.01 MB

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary vercel/next.js webpack/5.31 Change
buildDuration 13.5s 13.3s -216ms
nodeModulesSize 45.9 MB 46 MB ⚠️ +6.16 kB
Page Load Tests Overall increase ✓
vercel/next.js canary vercel/next.js webpack/5.31 Change
/ failed reqs 0 0
/ total time (seconds) 2.416 2.399 -0.02
/ avg req/sec 1034.7 1042.19 +7.49
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.259 1.241 -0.02
/error-in-render avg req/sec 1985.33 2014.53 +29.2
Client Bundles (main, webpack, commons)
vercel/next.js canary vercel/next.js webpack/5.31 Change
597-3f457946..288d.js gzip 13.3 kB 13.3 kB
778-5cc798ac..5c25.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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 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 vercel/next.js webpack/5.31 Change
_buildManifest.js gzip 349 B 349 B
Overall change 349 B 349 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js webpack/5.31 Change
index.html gzip 610 B 610 B
link.html gzip 617 B 617 B
withRouter.html gzip 605 B 605 B
Overall change 1.83 kB 1.83 kB

Diffs

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

@kodiakhq kodiakhq bot merged commit c5cf9e4 into canary Apr 7, 2021
@kodiakhq kodiakhq bot deleted the webpack/5.31 branch April 7, 2021 18:55
divmain added a commit to divmain/next.js that referenced this pull request Apr 7, 2021
* origin/canary: (36 commits)
  Fixed issue accessing index page of "with-reason-relay" example (vercel#23780)
  upgrade to webpack 5.31.0 (vercel#23776)
  Add note about prefetching (vercel#23732)
  v10.1.4-canary.2
  Ensure no-op export returns without error (vercel#23752)
  Update to with-supertokens example (vercel#23728)
  Ensure fallback rewrites dont match over pages with i18n (vercel#23674)
  Ensure basePath is not applied for external GSSP redirect (vercel#23673)
  Fix webpack5 cache distDir (vercel#23718)
  v10.1.4-canary.1
  Stop mutating `resolvedAsPath` (vercel#23705)
  Font optimization (vercel#21676)
  v10.1.4-canary.0
  Ensure default fallback values are correct with i18n (vercel#23675)
  Fix: Codeblock Syntax Highlighting (vercel#23545)
  fix with-mqtt-js example. (vercel#23636)
  fix with-styled-jsx-plugins example. (vercel#23635)
  fix with-web-worker example. (vercel#23634)
  fixes a part of vercel#23607 remove with-glamor example (vercel#23639)
  v10.1.3
  ...

# Conflicts:
#	packages/next/package.json
#	yarn.lock
SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
* fixes a bundle size regression from webpack 4 to 5
* fixes these warnings during resolving build dependencies for packages using `exports`

## 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
Development

Successfully merging this pull request may close these issues.

2 participants