| | |
| | | import { defineConfig, loadEnv } from 'vite'; |
| | | import viteCompression from 'vite-plugin-compression'; |
| | | import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'; |
| | | import { viteCommonjs } from '@originjs/vite-plugin-commonjs' |
| | | |
| | | const pathResolve = (dir: string) => { |
| | | return resolve(__dirname, '.', dir); |
| | | }; |
| | |
| | | plugins: [ |
| | | vue(), |
| | | vueSetupExtend(), |
| | | viteCommonjs(), |
| | | |
| | | viteCompression({ |
| | | threshold: 1024000, |
| | | }), |
| | |
| | | host: '0.0.0.0', |
| | | port: env.VITE_PORT as unknown as number, |
| | | open: JSON.parse(env.VITE_OPEN), |
| | | hmr: true, |
| | | hmr: false, |
| | | proxy: { |
| | | '/gitee': { |
| | | target: 'https://gitee.com', |