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

Function getResolvedOutDirs

packages/vite/src/node/watch.ts:11–24  ·  view source on GitHub ↗
(
  root: string,
  outDir: string,
  outputOptions: OutputOptions[] | OutputOptions | undefined,
)

Source from the content-addressed store, hash-verified

9import type { Logger } from './logger'
10
11export function getResolvedOutDirs(
12 root: string,
13 outDir: string,
14 outputOptions: OutputOptions[] | OutputOptions | undefined,
15): Set<string> {
16 const resolvedOutDir = path.resolve(root, outDir)
17 if (!outputOptions) return new Set([resolvedOutDir])
18
19 return new Set(
20 arraify(outputOptions).map(({ dir }) =>
21 dir ? path.resolve(root, dir) : resolvedOutDir,
22 ),
23 )
24}
25
26export function resolveEmptyOutDir(
27 emptyOutDir: boolean | null,

Callers 3

buildEnvironmentFunction · 0.90
_createServerFunction · 0.90
handlerFunction · 0.90

Calls 2

arraifyFunction · 0.90
resolveMethod · 0.65

Tested by

no test coverage detected