diff --git a/packages/next/build/babel/plugins/react-loadable-plugin.ts b/packages/next/build/babel/plugins/react-loadable-plugin.ts index f6491aac59f3b..705b5ee5a7409 100644 --- a/packages/next/build/babel/plugins/react-loadable-plugin.ts +++ b/packages/next/build/babel/plugins/react-loadable-plugin.ts @@ -151,7 +151,7 @@ export default function ({ t.binaryExpression( '+', t.stringLiteral( - (state.file.opts.caller.pagesDir + (state.file.opts.caller?.pagesDir ? relativePath( state.file.opts.caller.pagesDir, state.file.opts.filename