admin-vben/apps/antd-view/vite.config.mts

36 lines
851 B
TypeScript
Raw Normal View History

2024-05-19 13:20:42 +00:00
import { defineConfig } from '@vben/vite-config';
export default defineConfig({
appcation: {
compress: false,
compressTypes: ['brotli', 'gzip'],
importmap: false,
importmapOptions: {
// 通过 Importmap CDN 方式引入,
// 目前只有esm.sh源兼容性好一点jspm.io对于 esm 入口要求高
defaultProvider: 'esm.sh',
importmap: [
{ name: 'vue' },
{ name: 'pinia' },
{ name: 'vue-router' },
{ name: 'vue-i18n' },
{ name: 'dayjs' },
{ name: 'vue-demi' },
],
},
2024-05-22 14:03:41 +00:00
visualizer: false,
2024-05-19 13:20:42 +00:00
},
vite: {
server: {
proxy: {
'/vben-api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/vben-api/, ''),
target: 'http://localhost:3000',
ws: true,
},
},
},
},
});