-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (34 loc) · 954 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import webExtension from '@samrum/vite-plugin-web-extension';
import { getManifest } from './src/manifest';
import { resolve } from 'node:path';
export default defineConfig({
plugins: [solidPlugin(), webExtension({ manifest: getManifest() })],
test: {
environment: 'jsdom',
globals: true,
transformMode: {
web: [/\.[jt]sx?$/],
},
coverage: { enabled: true },
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,
outDir: resolve(__dirname, 'dist'),
},
resolve: {
conditions: ['development', 'browser'],
},
});