dyomedea/vite.config.ts

34 lines
765 B
TypeScript
Raw Normal View History

2022-11-25 15:33:59 +00:00
/// <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'],
},
});