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

Function canLoadConfig

packages/vite/src/node/__tests__/config.spec.ts:1399–1410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1397 }
1398
1399 const canLoadConfig = async () => {
1400 const result = await loadConfigFromFile(
1401 { command: 'build', mode: 'production' },
1402 undefined,
1403 root,
1404 )
1405 expect(result).toBeTruthy()
1406 expect(result?.config).toStrictEqual({ define: { foo: 1 } })
1407 expect(path.normalize(result!.path)).toBe(
1408 path.resolve(root, writtenConfig!),
1409 )
1410 }
1411
1412 const cases = [
1413 {

Callers 1

config.spec.tsFile · 0.85

Calls 2

loadConfigFromFileFunction · 0.90
resolveMethod · 0.65

Tested by

no test coverage detected