Skip to content

Commit 171f2fb

Browse files
authored
fix(legacy): warn if plugin-legacy is passed to worker.plugins (#19079)
1 parent 002a538 commit 171f2fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/plugin-legacy/src/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,13 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
267267
),
268268
)
269269
}
270+
if (config.isWorker) {
271+
config.logger.warn(
272+
colors.yellow(
273+
`plugin-legacy should not be passed to 'worker.plugins'. Pass to 'plugins' instead. Note that generating legacy chunks for workers are not supported by plugin-legacy.`,
274+
),
275+
)
276+
}
270277
},
271278
}
272279

0 commit comments

Comments
 (0)