Skip to content

Commit

Permalink
Do not run react compioler for files in node modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 5, 2025
1 parent d70cac3 commit 5391ca6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/next/src/build/babel/loader/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ function getFreshConfig(
return false
}

if (filename.includes('node_modules')) {
return false
}

if (
loaderOptions.reactCompilerExclude &&
loaderOptions.reactCompilerExclude(filename)
Expand Down

0 comments on commit 5391ca6

Please sign in to comment.