forked from yeatmanlab/roar-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
73 lines (69 loc) · 1.89 KB
/
vite.config.js
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
62
63
64
65
66
67
68
69
70
71
72
73
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { fileURLToPath, URL } from 'url';
import { defineConfig } from 'vite';
import Vue from '@vitejs/plugin-vue';
import mkcert from 'vite-plugin-mkcert';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import UnheadVite from '@unhead/addons/vite';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
Vue({
include: [/\.vue$/, /\.md$/],
}),
nodePolyfills({
globals: {
process: true,
},
}),
UnheadVite(),
...(process.env.NODE_ENV === 'development' ? [mkcert()] : []),
...(process.env.NODE_ENV !== 'development'
? [
sentryVitePlugin({
org: 'roar-89588e380',
project: 'dashboard',
}),
]
: []),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
fs: {
allow: ['..'],
},
},
build: {
cssCodeSplit: true,
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
lodash: ['lodash'],
tanstack: ['@tanstack/vue-query'],
chartJs: ['chart.js'],
sentry: ['@sentry/browser', '@sentry/integrations', '@sentry/vue', '@sentry/wasm'],
roam: ['@bdelab/roam-apps'],
firekit: ['@bdelab/roar-firekit'],
letter: ['@bdelab/roar-letter'],
multichoice: ['@bdelab/roar-multichoice'],
phoneme: ['@bdelab/roar-pa'],
sre: ['@bdelab/roar-sre'],
swr: ['@bdelab/roar-swr'],
utils: ['@bdelab/roar-utils'],
vocab: ['@bdelab/roar-vocab'],
ran: ['@bdelab/roav-ran'],
crowding: ['@bdelab/roav-crowding'],
'roav-mep': ['@bdelab/roav-mep'],
},
},
},
},
optimizeDeps: {
include: ['@bdelab/roar-firekit', 'vue-google-maps-community-fork', 'fast-deep-equal'],
},
});