Skip to content

Commit 97d5111

Browse files
authored
fix: skip prepareOutDirPlugin in workers (vitejs#20556)
1 parent 3c961ec commit 97d5111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
467467
return {
468468
pre: [
469469
completeSystemWrapPlugin(),
470-
prepareOutDirPlugin(),
470+
...(!config.isWorker ? [prepareOutDirPlugin()] : []),
471471
perEnvironmentPlugin('commonjs', (environment) => {
472472
const { commonjsOptions } = environment.config.build
473473
const usePluginCommonjs =

0 commit comments

Comments
 (0)