Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

vite.config.ts

28 lines729 Bytes

1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/vite-config'
3import solid from 'vite-plugin-solid'
4import packageJson from './package.json'
5import type { Plugin } from 'vite'
6​
7const config = defineConfig({
8 plugins: [solid() as any satisfies Plugin],
9 test: {
10 name: packageJson.name,
11 dir: './',
12 include: ['tests/**/*.{ts,tsx}'],
13 exclude: ['tests/test-setup.ts', '**/node_modules/**'],
14 watch: false,
15 environment: 'jsdom',
16 setupFiles: ['./tests/test-setup.ts'],
17 globals: true,
18 },
19})
20​
21export default mergeConfig(
22 config,
23 tanstackViteConfig({
24 entry: ['./src/index.ts', './src/icons.ts'],
25 srcDir: './src',
26 cjs: false,
27 }),