Skip to content

Commit

Permalink
Resolve global next Webpack alias last (#65123)
Browse files Browse the repository at this point in the history
Closes NEXT-3249
  • Loading branch information
eps1lon committed Apr 30, 2024
1 parent a55b912 commit 2c98c11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/next/src/build/create-compiler-aliases.ts
Expand Up @@ -118,8 +118,6 @@ export function createWebpackAliases({
}
: undefined),

next: NEXT_PROJECT_ROOT,

'styled-jsx/style$': defaultOverrides['styled-jsx/style'],
'styled-jsx$': defaultOverrides['styled-jsx'],

Expand Down
7 changes: 7 additions & 0 deletions packages/next/src/build/webpack-config.ts
Expand Up @@ -1683,6 +1683,13 @@ export default async function getBaseWebpackConfig(
]
},
},
{
resolve: {
alias: {
next: NEXT_PROJECT_ROOT,
},
},
},
],
},
plugins: [
Expand Down

0 comments on commit 2c98c11

Please sign in to comment.