Skip to content

Commit

Permalink
fix separate router contexts in edge
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 13, 2022
1 parent f3ca765 commit a4dd82b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/next/build/webpack-config.ts
Expand Up @@ -863,6 +863,16 @@ export default async function getBaseWebpackConfig(
// let this alias hit before `next` alias.
...(isEdgeServer
? {
// app-router-context can not be ESM and CJS so force CJS
'next/dist/shared/lib/app-router-context': path.join(
__dirname,
'../dist/shared/lib/app-router-context.js'
),
'next/dist/client/components': path.join(
__dirname,
'../client/components'
),

'next/dist/client': 'next/dist/esm/client',
'next/dist/shared': 'next/dist/esm/shared',
'next/dist/pages': 'next/dist/esm/pages',
Expand Down

0 comments on commit a4dd82b

Please sign in to comment.