Skip to content

Commit

Permalink
Update externals
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Apr 13, 2020
1 parent 912e8a0 commit b2d20cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,12 @@ export default async function getBaseWebpackConfig(

let isNextExternal: boolean = false
if (isLocal) {
isNextExternal = /next[/\\]dist[/\\]next-server[/\\]/.test(res)
// we need to process next-server/lib/router/router so that
// the DefinePlugin can inject process.env values
isNextExternal = /next[/\\]dist[/\\]next-server[/\\](?!lib[/\\]router[/\\]router)/.test(
res
)

if (!isNextExternal) {
return callback()
}
Expand Down

0 comments on commit b2d20cd

Please sign in to comment.