-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.mjs
More file actions
34 lines (32 loc) · 847 Bytes
/
vite.config.mjs
File metadata and controls
34 lines (32 loc) · 847 Bytes
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import eslint from 'vite-plugin-eslint2';
// For documentation see https://vitejs.dev/config/
export default defineConfig({
base: '/metadata/', // GitHub Pages subpath
appType: 'spa',
plugins: [
react(),
eslint({
// run ESLint only during dev (serve). Use `eslint .` in CI to fail builds.
dev: true,
build: false,
// keep dev fast and still see results
lintInWorker: true,
lintOnStart: true,
// exclude build products
exclude: ['node_modules', 'dist']
})
],
server: { open: true },
preview: { open: true },
build: {
target: 'baseline-widely-available',
outDir: 'dist'
},
test: {
environment: 'jsdom',
setupFiles: './src/setupTests.js',
globals: true
}
});