| | |
| | | /* |
| | | * @Description: file content |
| | | * @Author: your name |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:26 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-18 18:06:29 |
| | | */ |
| | | import { defineApplicationConfig } from '@vben/vite-config'; |
| | | import topLevelAwait from 'vite-plugin-top-level-await'; |
| | | |
| | | export default defineApplicationConfig({ |
| | | overrides: { |
| | |
| | | port: 3100, |
| | | proxy: { |
| | | '/basic-api': { |
| | | target: 'http://localhost:9528', |
| | | target: 'http://localhost:3000', |
| | | changeOrigin: true, |
| | | ws: true, |
| | | rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), |
| | |
| | | rewrite: (path) => path.replace(new RegExp(`^/upload`), ''), |
| | | }, |
| | | }, |
| | | open: true, // 项目启动后,自动打开 |
| | | warmup: { |
| | | clientFiles: ['./index.html', './src/{views,components}/*'], |
| | | }, |
| | | }, |
| | | plugins: [ |
| | | topLevelAwait({ |
| | | promiseExportName: '__tla', |
| | | promiseImportName: (i) => `__tla_${i}`, |
| | | }), |
| | | ], |
| | | build: { |
| | | target: 'esnext', |
| | | rollupOptions: { |