Skip to content

Commit

Permalink
require.resolve instead
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed May 16, 2024
1 parent 9342435 commit 4d4b2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/build/get-babel-loader-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function getReactCompiler() {
try {
// It's in peerDependencies, so it should be available
// eslint-disable-next-line import/no-extraneous-dependencies
return require('babel-plugin-react-compiler')
return require.resolve('babel-plugin-react-compiler')
} catch {
throw new Error(
'Failed to load the `babel-plugin-react-compiler`. It is required to use the React Compiler. Please install it.'
Expand Down

0 comments on commit 4d4b2f4

Please sign in to comment.