34 lines
765 B
TypeScript
34 lines
765 B
TypeScript
|
/// <reference types="vitest" />
|
||
|
/// <reference types="vite/client" />
|
||
|
|
||
|
import { defineConfig } from 'vite';
|
||
|
import solidPlugin from 'vite-plugin-solid';
|
||
|
|
||
|
export default defineConfig({
|
||
|
plugins: [solidPlugin()],
|
||
|
test: {
|
||
|
environment: 'jsdom',
|
||
|
globals: true,
|
||
|
transformMode: {
|
||
|
web: [/\.[jt]sx?$/],
|
||
|
},
|
||
|
setupFiles: './setupVitest.ts',
|
||
|
// solid needs to be inline to work around
|
||
|
// a resolution issue in vitest:
|
||
|
deps: {
|
||
|
inline: [/solid-js/],
|
||
|
},
|
||
|
// if you have few tests, try commenting one
|
||
|
// or both out to improve performance:
|
||
|
threads: false,
|
||
|
isolate: false,
|
||
|
},
|
||
|
build: {
|
||
|
target: 'esnext',
|
||
|
polyfillDynamicImport: false,
|
||
|
},
|
||
|
resolve: {
|
||
|
conditions: ['development', 'browser'],
|
||
|
},
|
||
|
});
|