vitest.config.js — svelte Source File
Architecture documentation for vitest.config.js, a javascript file in the svelte codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 28f7f352_7dd2_f527_9015_2d7f8b9cc569["vitest.config.js"] f596e027_a951_36c9_7695_83acc4f0d6b9["node:fs"] 28f7f352_7dd2_f527_9015_2d7f8b9cc569 --> f596e027_a951_36c9_7695_83acc4f0d6b9 f8929fbd_6327_2bb8_f43b_31a3db2e4d74["node:path"] 28f7f352_7dd2_f527_9015_2d7f8b9cc569 --> f8929fbd_6327_2bb8_f43b_31a3db2e4d74 884a25d1_8f9f_2cf4_87a9_d1a619b307ce["config"] 28f7f352_7dd2_f527_9015_2d7f8b9cc569 --> 884a25d1_8f9f_2cf4_87a9_d1a619b307ce style 28f7f352_7dd2_f527_9015_2d7f8b9cc569 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as fs from 'node:fs';
import * as path from 'node:path';
import { configDefaults, defineConfig } from 'vitest/config';
const pkg = JSON.parse(fs.readFileSync('packages/svelte/package.json', 'utf8'));
export default defineConfig({
resolve: {
alias: [
{
find: /^svelte\/?/,
customResolver: (id, importer) => {
// For some reason this turns up as "undefined" instead of "svelte/"
const exported = pkg.exports[id === 'undefined' ? '.' : id.replace('undefined', './')];
if (!exported) return;
// When running the server version of the Svelte files,
// we also want to use the server export of the Svelte package
return path.resolve(
'packages/svelte',
importer?.includes('_output/server')
? exported.default
: exported.browser ?? exported.default
);
}
}
]
},
test: {
dir: '.',
reporters: ['dot'],
include: [
'packages/svelte/**/*.test.ts',
'packages/svelte/tests/*/test.ts',
'packages/svelte/tests/runtime-browser/test-ssr.ts'
],
exclude: [...configDefaults.exclude, '**/samples/**'],
coverage: {
provider: 'v8',
reporter: ['lcov', 'html'],
include: ['packages/svelte/src/**'],
reportsDirectory: 'coverage',
reportOnFailure: true
}
}
});
Dependencies
- config
- node:fs
- node:path
Source
Frequently Asked Questions
What does vitest.config.js do?
vitest.config.js is a source file in the svelte codebase, written in javascript.
What does vitest.config.js depend on?
vitest.config.js imports 3 module(s): config, node:fs, node:path.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free