diff --git a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts index 60b82966e3ce..e68e0573184d 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-app-route-loader/index.ts @@ -15,7 +15,7 @@ export type EdgeAppRouteLoaderQuery = { } const EdgeAppRouteLoader: webpack.LoaderDefinitionFunction = - async function (this) { + function (this) { const { page, absolutePagePath, diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts index e9b34ad67b17..f4f0e247f35d 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts @@ -39,7 +39,7 @@ function swapDistFolderWithEsmDistFolder(path: string) { } const edgeSSRLoader: webpack.LoaderDefinitionFunction = - async function edgeSSRLoader(this) { + function edgeSSRLoader(this) { const { dev, page, diff --git a/packages/next/src/build/webpack/loaders/next-flight-client-entry-loader.ts b/packages/next/src/build/webpack/loaders/next-flight-client-entry-loader.ts index 25ab2cf9d7be..0be3b6fa2b75 100644 --- a/packages/next/src/build/webpack/loaders/next-flight-client-entry-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-flight-client-entry-loader.ts @@ -11,7 +11,7 @@ export type NextFlightClientEntryLoaderOptions = { server: boolean | 'true' | 'false' } -export default async function transformSource(this: any): Promise { +export default function transformSource(this: any) { let { modules, server }: NextFlightClientEntryLoaderOptions = this.getOptions() const isServer = server === 'true' diff --git a/packages/next/src/build/webpack/loaders/next-flight-client-module-loader.ts b/packages/next/src/build/webpack/loaders/next-flight-client-module-loader.ts index a827a567d2b5..3a5001697e06 100644 --- a/packages/next/src/build/webpack/loaders/next-flight-client-module-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-flight-client-module-loader.ts @@ -1,7 +1,7 @@ import { getRSCModuleInformation } from '../../analysis/get-page-static-info' import { getModuleBuildInfo } from './get-module-build-info' -export default async function transformSource( +export default function transformSource( this: any, source: string, sourceMap: any @@ -11,8 +11,6 @@ export default async function transformSource( throw new Error('Expected source to have been transformed to a string.') } - const callback = this.async() - // Assign the RSC meta information to buildInfo. const buildInfo = getModuleBuildInfo(this._module) buildInfo.rsc = getRSCModuleInformation(source, false) @@ -31,5 +29,5 @@ ${source} ` } - return callback(null, source, sourceMap) + return this.callback(null, source, sourceMap) }