@devground/vitest-config
v0.2.0
Published
Shared Vitest configuration for devground packages (node env, no globals, v8 coverage profile)
Downloads
102
Maintainers
Readme
@devground/vitest-config
Shared Vitest configuration for devground packages.
Install
pnpm add -D @devground/vitest-config vitestIn the monorepo:
{
"devDependencies": {
"@devground/vitest-config": "workspace:*"
}
}Usage
Extend it with mergeConfig so you keep the shared defaults and can override
per package:
// vitest.config.ts
import { mergeConfig, defineConfig } from 'vitest/config';
import shared from '@devground/vitest-config';
export default mergeConfig(
shared,
defineConfig({
// package-specific overrides go here
}),
);Or re-export it directly when no overrides are needed:
export { default } from '@devground/vitest-config';What it sets
environment: 'node'globals: false— import test APIs explicitly fromvitestinclude: ['src/**/*.test.ts']- v8 coverage profile (
text+htmlreporters) that excludes build output, declarations, configs and the test files themselves
Coverage is opt-in: the v8 provider only loads when you pass --coverage, so a
plain vitest run works even without @vitest/coverage-v8 installed.
