MCPcopy
hub / github.com/vitejs/vite / configResolved

Function configResolved

packages/plugin-legacy/src/index.ts:260–289  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

258 }
259 },
260 configResolved(config) {
261 if (overriddenBuildTarget) {
262 config.logger.warn(
263 colors.yellow(
264 `plugin-legacy overrode 'build.target'. You should pass 'targets' as an option to this plugin with the list of legacy browsers to support instead.`,
265 ),
266 )
267 }
268 if (overriddenBuildTargetOnlyModern) {
269 config.logger.warn(
270 colors.yellow(
271 `plugin-legacy overrode 'build.target'. You should pass 'modernTargets' as an option to this plugin with the list of browsers to support instead.`,
272 ),
273 )
274 }
275 if (overriddenDefaultModernTargets) {
276 config.logger.warn(
277 colors.yellow(
278 `plugin-legacy 'modernTargets' option overrode the builtin targets of modern chunks. Some versions of browsers between legacy and modern may not be supported.`,
279 ),
280 )
281 }
282 if (config.isWorker) {
283 config.logger.warn(
284 colors.yellow(
285 `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.`,
286 ),
287 )
288 }
289 },
290 }
291
292 const legacyGenerateBundlePlugin: Plugin = {

Callers

nothing calls this directly

Calls 4

createLegacyOutputFunction · 0.85
logMethod · 0.80
hasMethod · 0.80
warnMethod · 0.65

Tested by

no test coverage detected