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

Function setupRollupOptionCompatForEnvironment

packages/vite/src/node/utils.ts:1303–1312  ·  view source on GitHub ↗

* Sets up `rollupOptions` compat proxies for an environment.

(environment: any)

Source from the content-addressed store, hash-verified

1301 * Sets up `rollupOptions` compat proxies for an environment.
1302 */
1303function setupRollupOptionCompatForEnvironment(environment: any): any {
1304 if (!isObject(environment)) {
1305 return environment
1306 }
1307 const merged: Record<string, any> = { ...environment }
1308 if (isObject(merged.build)) {
1309 setupRollupOptionCompat(merged.build, 'build')
1310 }
1311 return merged
1312}
1313
1314export function hasBothRollupOptionsAndRolldownOptions(
1315 options: Record<string, any>,

Callers 1

mergeConfigRecursivelyFunction · 0.85

Calls 2

isObjectFunction · 0.85
setupRollupOptionCompatFunction · 0.85

Tested by

no test coverage detected