-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathvite.config.js
More file actions
48 lines (46 loc) · 1.15 KB
/
vite.config.js
File metadata and controls
48 lines (46 loc) · 1.15 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
import { readFileSync } from 'fs';
import { configDefaults } from 'vitest/config';
const jqueryUiVersion = JSON.parse(
readFileSync('./node_modules/jquery-ui/package.json', 'utf8')
).version;
export default defineConfig(({ command }) => ({
base: command === 'build' ? '/4bit/' : '/',
plugins: [vue()],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
about: resolve(__dirname, 'about/index.html'),
},
},
},
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
optimizeDeps: {
include: ['jquery', 'jquery-ui'],
},
test: {
exclude: [
...configDefaults.exclude,
'tests/e2e/**',
],
coverage: {
provider: 'v8',
all: true,
reportsDirectory: './coverage',
reporter: ['text-summary', 'json-summary', 'html', 'lcov'],
include: ['src/**/*.js'],
exclude: [
'src/presentation/editor-page/main.js',
'src/presentation/about-page/main.js',
'src/infrastructure/vendor/**',
],
},
},
}));