Skip to content

Commit

Permalink
use esm and only spliy async chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 14, 2022
1 parent ee50c00 commit c1450bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/next/build/webpack-config.ts
Expand Up @@ -1328,7 +1328,6 @@ export default async function getBaseWebpackConfig(
if (isEdgeServer) {
return {
filename: 'edge-chunks/[name].js',
chunks: 'all',
minChunks: 2,
}
}
Expand Down
Expand Up @@ -18,7 +18,7 @@ export default function middlewareLoader(this: any) {
buildInfo.rootDir = rootDir

return `
import { adapter, enhanceGlobals } from 'next/dist/server/web/adapter'
import { adapter, enhanceGlobals } from 'next/dist/esm/server/web/adapter'
enhanceGlobals()
Expand Down
Expand Up @@ -40,7 +40,7 @@ export default function middlewareLoader(this: any) {
buildInfo.rootDir = rootDir

return `
import { adapter, blockUnallowedResponse, enhanceGlobals } from 'next/dist/server/web/adapter'
import { adapter, blockUnallowedResponse, enhanceGlobals } from 'next/dist/esm/server/web/adapter'
enhanceGlobals()
Expand Down

0 comments on commit c1450bc

Please sign in to comment.