diff --git a/packages/next/build/webpack/loaders/next-flight-server-loader.ts b/packages/next/build/webpack/loaders/next-flight-server-loader.ts index b3146902f79fc..0419079a76f7b 100644 --- a/packages/next/build/webpack/loaders/next-flight-server-loader.ts +++ b/packages/next/build/webpack/loaders/next-flight-server-loader.ts @@ -238,7 +238,12 @@ export default async function transformSource( __webpack_require__, _: () => { ${imports - .map((importSource) => `require('${importSource}');`) + .map( + (importSource) => + `import(/* webpackMode: "eager" */ ${JSON.stringify( + importSource + )});` + ) .join('\n')} }, server: ${isServerExt ? 'true' : 'false'}