-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
61 lines (59 loc) · 1.65 KB
/
Copy pathvite.config.js
File metadata and controls
61 lines (59 loc) · 1.65 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
49
50
51
52
53
54
55
56
57
58
59
60
61
import { resolve } from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { devServerPlugin } from '@openc3/js-common/viteDevServerPlugin'
const DEFAULT_EXTENSIONS = ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json']
export default defineConfig((options) => {
return {
test: {
globals: true,
coverage: {
provider: 'v8',
include: ['src/lib/**'],
reporter: ['text', 'html'],
},
},
build: {
outDir: 'tools/trends',
emptyOutDir: true,
rollupOptions: {
input: 'src/main.js',
output: {
format: 'systemjs',
hashCharacters: 'hex',
entryFileNames: '[name].js',
chunkFileNames: '[name]-[hash:20].js',
assetFileNames: 'assets/[name]-[hash][extname]',
},
external: ['single-spa', 'vue', 'pinia', 'vue-router', 'vuetify'],
preserveEntrySignatures: 'strict',
},
},
server: {
port: 2875,
},
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('rux-'),
},
},
}),
devServerPlugin(options),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import
dedupe: ['single-spa', 'vue', 'vuetify', 'vue-router', 'pinia'],
},
define: {
__BASE_URL__: JSON.stringify('/tools/trends'),
},
optimizeDeps: {
entries: [], // https://github.com/vituum/vituum/issues/25#issuecomment-1690080284
},
}
})