From d0e93ed6829eb5d35c33da012f06cb0abdbc9cfb Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Tue, 13 Sep 2022 13:30:10 +0200 Subject: [PATCH] named params --- .../build/webpack/loaders/next-flight-client-loader/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/next/build/webpack/loaders/next-flight-client-loader/index.ts b/packages/next/build/webpack/loaders/next-flight-client-loader/index.ts index f3fe3e729ac6740..1e0fa161258d4cb 100644 --- a/packages/next/build/webpack/loaders/next-flight-client-loader/index.ts +++ b/packages/next/build/webpack/loaders/next-flight-client-loader/index.ts @@ -17,7 +17,8 @@ function containsPath(parent: string, child: string) { export default async function transformSource( this: any, source: string, - ...rest: any + map: any, + meta: any ) { if (typeof source !== 'string') { throw new Error('Expected source to have been transformed to a string.') @@ -53,6 +54,6 @@ const { createProxy } = require("next/dist/build/webpack/loaders/next-flight-cli module.exports = createProxy(${JSON.stringify(this.resourcePath)}) ` // Pass empty sourcemap - callback(null, output, ...rest) + callback(null, output, map, meta) return }