-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathvite.config.js
46 lines (44 loc) · 1.29 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
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
import commonjs from 'vite-plugin-commonjs';
import vue from '@vitejs/plugin-vue'
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import vuetify from 'vite-plugin-vuetify';
export default ({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return defineConfig({
build: {
minify: 'terser'
},
plugins: [
vue(),
commonjs(),
nodePolyfills(),
vuetify({ autoImport: true })
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
},
server: {
allowedHosts: true,
host: '0.0.0.0',
port: 8080,
headers: {
'Document-Policy': 'js-profiling'
},
proxy: {
'^/api/[1-9]\\d*/(envelope|minidump|security|store)/': env.VITE_SENTRY_URL,
'^/api/*': {
target: 'http://host.docker.internal:8888',
changeOrigin: true,
}
}
},
define: {
global: 'globalThis',
},
})
};