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

fix: add declarations for compiled webpack and loader #21741

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

guybedford
Copy link
Contributor

@guybedford guybedford commented Feb 1, 2021

This should resolve the typing issues described in #21390 from the webpack inlining, by declaring next/dist/compiled/webpack in the main typing file as a source.

@ijjk
Copy link
Member

ijjk commented Feb 1, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
buildDuration 11.7s 12s ⚠️ +302ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Page Load Tests Overall increase ✓
vercel/next.js canary guybedford/next.js compiled-types Change
/ failed reqs 0 0
/ total time (seconds) 2.432 2.445 ⚠️ +0.01
/ avg req/sec 1028.1 1022.49 ⚠️ -5.61
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.691 1.637 -0.05
/error-in-render avg req/sec 1478.46 1526.79 +48.33
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
677f882d2ed8..49c4.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary guybedford/next.js compiled-types Change
index.html gzip 613 B 613 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 guybedford/next.js compiled-types Change
buildDuration 13.9s 13.7s -176ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
677f882d2ed8..49c4.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary guybedford/next.js compiled-types Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.06 MB 1.06 MB
withRouter.js 1.06 MB 1.06 MB
Overall change 5.19 MB 5.19 MB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
buildDuration 14.3s 14.1s -220ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
/ failed reqs 0 0
/ total time (seconds) 2.349 2.426 ⚠️ +0.08
/ avg req/sec 1064.07 1030.54 ⚠️ -33.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.643 1.75 ⚠️ +0.11
/error-in-render avg req/sec 1521.83 1428.34 ⚠️ -93.49
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
597-6c246419..806f.js gzip 13 kB 13 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.57 kB 6.57 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-6e0a903..b885.js gzip 1.26 kB 1.26 kB
_error-7a100..a392.js gzip 3.38 kB 3.38 kB
hooks-f7e199..11b9.js gzip 904 B 904 B
index-3dc22c..ffbb.js gzip 232 B 232 B
link-c010d28..b60a.js gzip 1.63 kB 1.63 kB
routerDirect..323a.js gzip 308 B 308 B
withRouter-a..2ef8.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary guybedford/next.js compiled-types Change
index.html gzip 584 B 584 B
link.html gzip 592 B 592 B
withRouter.html gzip 577 B 577 B
Overall change 1.75 kB 1.75 kB

Diffs

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

@ijjk
Copy link
Member

ijjk commented Feb 1, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
buildDuration 10.2s 9.9s -323ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
/ failed reqs 0 0
/ total time (seconds) 1.921 2.008 ⚠️ +0.09
/ avg req/sec 1301.21 1245.08 ⚠️ -56.13
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.202 1.24 ⚠️ +0.04
/error-in-render avg req/sec 2079.93 2016.26 ⚠️ -63.67
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
677f882d2ed8..49c4.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary guybedford/next.js compiled-types Change
index.html gzip 613 B 613 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 guybedford/next.js compiled-types Change
buildDuration 11.5s 12.3s ⚠️ +754ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
677f882d2ed8..49c4.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary guybedford/next.js compiled-types Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.06 MB 1.06 MB
withRouter.js 1.06 MB 1.06 MB
Overall change 5.19 MB 5.19 MB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
buildDuration 12.9s 12.3s -584ms
nodeModulesSize 75 MB 75 MB ⚠️ +102 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary guybedford/next.js compiled-types Change
/ failed reqs 0 0
/ total time (seconds) 1.956 2.01 ⚠️ +0.05
/ avg req/sec 1278.2 1243.51 ⚠️ -34.69
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.264 1.27 ⚠️ +0.01
/error-in-render avg req/sec 1978.21 1969.08 ⚠️ -9.13
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js compiled-types Change
597-6c246419..806f.js gzip 13 kB 13 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.57 kB 6.57 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js compiled-types 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 guybedford/next.js compiled-types Change
_app-6e0a903..b885.js gzip 1.26 kB 1.26 kB
_error-7a100..a392.js gzip 3.38 kB 3.38 kB
hooks-f7e199..11b9.js gzip 904 B 904 B
index-3dc22c..ffbb.js gzip 232 B 232 B
link-c010d28..b60a.js gzip 1.63 kB 1.63 kB
routerDirect..323a.js gzip 308 B 308 B
withRouter-a..2ef8.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js compiled-types Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary guybedford/next.js compiled-types Change
index.html gzip 584 B 584 B
link.html gzip 592 B 592 B
withRouter.html gzip 577 B 577 B
Overall change 1.75 kB 1.75 kB

Diffs

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

@kodiakhq kodiakhq bot merged commit d5a4dec into vercel:canary Feb 1, 2021
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 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.

3 participants