js-vitest template
small update for fix-jest-dom
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import solidPlugin from 'vite-plugin-solid';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
transformMode: {
|
||||
web: [/\.jsx?$/],
|
||||
},
|
||||
setupFiles: './setupVitest.js',
|
||||
// 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,
|
||||
},
|
||||
plugins: [solidPlugin()],
|
||||
build: {
|
||||
target: 'esnext',
|
||||
polyfillDynamicImport: false,
|
||||
},
|
||||
resolve: {
|
||||
conditions: ['development', 'browser'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user