Skip to content

Commit

Permalink
Upgrade webpack to disable async chunk loading for server web runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 11, 2021
1 parent bd80038 commit 3e348a2
Show file tree
Hide file tree
Showing 6 changed files with 109,956 additions and 109,925 deletions.
1 change: 1 addition & 0 deletions packages/next/build/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export function finalizeEntrypoint({
type: 'assign',
},
runtime: MIDDLEWARE_SSR_RUNTIME_WEBPACK,
asyncChunks: false,
...entry,
}
return ssrMiddlewareEntry
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 @@ -266,7 +266,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
Expand Up @@ -162,8 +162,7 @@ describe('concurrentFeatures - dev', () => {
await killApp(context.server)
})

// TODO: re-enabled test when update webpack with chunkLoading support
it.skip('should support React.lazy and dynamic imports', async () => {
it('should support React.lazy and dynamic imports', async () => {
const html = await renderViaHTTP(context.appPort, '/dynamic-imports')
expect(html).toContain('loading...')

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 3e348a2

Please sign in to comment.