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

Function writePackageJson

packages/vite/src/node/__tests__/config.spec.ts:1389–1397  ·  view source on GitHub ↗
(typeField: string | undefined)

Source from the content-addressed store, hash-verified

1387 writtenConfig = fileName
1388 }
1389 const writePackageJson = (typeField: string | undefined) => {
1390 fs.writeFileSync(
1391 path.resolve(root, 'package.json'),
1392 JSON.stringify({
1393 name: '@vitejs/test-load-config-from-file',
1394 type: typeField,
1395 }),
1396 )
1397 }
1398
1399 const canLoadConfig = async () => {
1400 const result = await loadConfigFromFile(

Callers 1

config.spec.tsFile · 0.85

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…