-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.mts
More file actions
46 lines (40 loc) · 851 Bytes
/
vite.config.mts
File metadata and controls
46 lines (40 loc) · 851 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
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'path';
import eslint from 'vite-plugin-eslint';
// https://vitejs.dev/config/
export default ({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('kb-') || tag.startsWith('media-'),
},
},
}),
eslint(),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
base: '/' + env.APP_BASE_PATH,
build: {
outDir: 'dist',
assetsDir: 'static',
},
server: {
port: 3000,
proxy: {
'/ds-api/bff/': {
target: env.DEVEL_API_BFF,
rewrite: (path) => path.replace(/^\/ds-api\/bff\//, ''),
changeOrigin: true,
},
},
},
});
};