Skip to content

Commit

Permalink
fix(plugin-legacy): fix legacy plugin not working in worker context
Browse files Browse the repository at this point in the history
  • Loading branch information
sapenlei committed Feb 5, 2025
1 parent f7b1964 commit 6d2b427
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 @@ -270,6 +270,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 6d2b427

Please sign in to comment.