vite.config.develop.ts
1.56 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
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import svgLoader from 'vite-svg-loader';
import vueSetupExtend from 'vite-plugin-vue-setup-extend';
export default defineConfig({
mode: 'production',
server: { https: true },
plugins: [vue(), vueJsx(), vueSetupExtend(), svgLoader({ svgoConfig: {} })],
// build:{
// rollupOptions: {
// output: {
// manualChunks: {
// echarts: ['echarts']
// }
// }
// }
// },
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, '../src'),
},
{
find: 'assets',
replacement: resolve(__dirname, '../src/assets'),
},
{
find: 'vue-i18n',
replacement: 'vue-i18n/dist/vue-i18n.cjs.js', // Resolve the i18n warning issue
},
{
find: 'vue',
replacement: 'vue/dist/vue.esm-bundler.js', // compile template. you can remove it, if you don't need.
},
],
extensions: ['.ts', '.js'],
},
define: {
'process.env': {
VITE_ENV: 'develop',
VITE_API_HOST: 'https://paopao-dev.hikoon.com',
VITE_SHOW_LOGIN_ACCOUNT: true,
VITE_OSS_ACCESS_KEY: 'LTAI4GKtcA6yTV6wnapivq7Y',
VITE_OSS_ACCESS_SECRET: 'QPEt0HPEuRe7wIk2wZNtKPF6L0xMmQ',
VITE_OSS_BUCKET: 'hisin-dev',
VITE_OSS_REGION: 'oss-cn-beijing',
VITE_OSS_HOST: 'https://hi-sing-cdn-dev.hikoon.com',
VITE_OSS_ENDPOINT: 'https://hisin-dev.oss-cn-beijing.aliyuncs.com',
},
},
});