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

Function hasBothRollupOptionsAndRolldownOptions

packages/vite/src/node/utils.ts:1314–1334  ·  view source on GitHub ↗
(
  options: Record<string, any>,
)

Source from the content-addressed store, hash-verified

1312}
1313
1314export function hasBothRollupOptionsAndRolldownOptions(
1315 options: Record<string, any>,
1316): boolean {
1317 for (const opt of [
1318 options.build,
1319 options.worker,
1320 options.optimizeDeps,
1321 options.ssr?.optimizeDeps,
1322 ]) {
1323 if (
1324 opt != null &&
1325 opt.rollupOptions != null &&
1326 opt.rolldownOptions != null &&
1327 // Check they are not just proxy values created by setupRollupOptionCompat
1328 opt.rollupOptions !== opt.rolldownOptions
1329 ) {
1330 return true
1331 }
1332 }
1333 return false
1334}
1335
1336const wsOptionKeys = [
1337 'protocol',

Callers 2

runConfigHookFunction · 0.90
config.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected