Skip to content

Commit

Permalink
disable chunk loading in web runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 11, 2021
1 parent 87a18ff commit d23c24b
Show file tree
Hide file tree
Showing 6 changed files with 109,956 additions and 109,927 deletions.
5 changes: 2 additions & 3 deletions packages/next/build/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ export function finalizeEntrypoint({
type: 'assign',
},
runtime: MIDDLEWARE_SSR_RUNTIME_WEBPACK,
// chunkLoading: false,
// Disable async chunk loading of webpack-runtime in server web runtime
asyncChunks: false,
...entry,
}
// @ts-ignore TODO: remove when webpack 5 is stable
return ssrMiddlewareEntry
}
if (isMiddleware) {
Expand All @@ -284,7 +284,6 @@ export function finalizeEntrypoint({
},
...entry,
}
// @ts-ignore TODO: remove when webpack 5 is stable
return middlewareEntry
}

Expand Down
219,865 changes: 109,948 additions & 109,917 deletions packages/next/compiled/webpack/bundle5.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"webpack-sources1": "npm:webpack-sources@1.4.3",
"webpack-sources3": "npm:webpack-sources@3.2.1",
"webpack4": "npm:webpack@4.44.1",
"webpack5": "npm:webpack@5.63.0",
"webpack5": "npm:webpack@5.64.0",
"ws": "8.2.3"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/react-18/app/components/dynamic-hello.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import dynamic from 'next/dynamic'
let ssr
const suspense = false

const Hello = dynamic(() => import(/* webpackMode: "eager" */ './hello'), {
const Hello = dynamic(() => import('./hello'), {
ssr,
suspense,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { lazy, Suspense } from 'react'

// TODO: fix code-splitting chunk loading scripting in web runtime.
const Foo = lazy(() => import('../components/foo.client'))

export default function Page() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19720,10 +19720,10 @@ webpack-bundle-analyzer@4.3.0:
watchpack "^1.7.4"
webpack-sources "^1.4.1"

"webpack5@npm:webpack@5.63.0":
version "5.63.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.63.0.tgz#4b074115800e0526d85112985e46c64b95e04aaf"
integrity sha512-HYrw6bkj/MDmphAXvqLEvn2fVoDZsYu6O638WjK6lSNgIpjb5jl/KtOrqJyU9EC/ZV9mLUmZW5h4mASB+CVA4A==
"webpack5@npm:webpack@5.64.0":
version "5.64.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.0.tgz#db3e12546f755930ccc9e0e21ba660871940c615"
integrity sha512-UclnN24m054HaPC45nmDEosX6yXWD+UGC12YtUs5i356DleAUGMDC9LBAw37xRRfgPKYIdCYjGA7RZ1AA+ZnGg==
dependencies:
"@types/eslint-scope" "^3.7.0"
"@types/estree" "^0.0.50"
Expand Down

0 comments on commit d23c24b

Please sign in to comment.