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 }) }),