Files
solidjs-templates/js-vitest/vite.config.js
T
AlexandreandGitHub 93c0b7eca8 Merge pull request #52 from amorimr/fix-vitest-run
fix: update vite config on templates using vitest
2022-08-27 11:16:12 +02:00

33 lines
720 B
JavaScript

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/, /solid-testing-library/],
},
// if you have few tests, try commenting one
// or both out to improve performance:
// threads: false,
// isolate: false,
},
plugins: [solidPlugin()],
server: {
port: 3000,
},
build: {
target: 'esnext',
},
resolve: {
conditions: ['development', 'browser'],
},
});