Skip to content

Commit

Permalink
fix(legacy): warn if plugin-legacy is passed to worker.plugins (#19079
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sapenlei authored Feb 7, 2025
1 parent 002a538 commit 171f2fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/plugin-legacy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
),
)
}
if (config.isWorker) {
config.logger.warn(
colors.yellow(
`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.`,
),
)
}
},
}

Expand Down

0 comments on commit 171f2fb

Please sign in to comment.