From b26ea64fe87a877723fb6d031617a25c1625cae0 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Fri, 7 Jan 2022 20:59:57 +0800 Subject: [PATCH] fix: plugins can't be pased to the worker --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d7c09872..2f693dfd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -152,6 +152,7 @@ export async function build(_options: Options) { ...options, // functions cannot be cloned esbuildPlugins: undefined, esbuildOptions: undefined, + plugins: undefined, }, }) worker.on('message', (data) => { @@ -221,7 +222,9 @@ export async function build(_options: Options) { logger, buildDependencies, }).catch((error) => { - previousBuildDependencies.forEach(v => buildDependencies.add(v)) + previousBuildDependencies.forEach((v) => + buildDependencies.add(v) + ) throw error }) }),