| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import { resolve } from 'path'
- export default defineConfig(({ mode }) => ({
- base: '/',
- plugins: [vue()],
- resolve: {
- alias: {
- '@': resolve(__dirname, 'src')
- }
- },
- build: {
- sourcemap: mode !== 'production',
- chunkSizeWarningLimit: 1000,
- rollupOptions: {
- output: {
- manualChunks: {
- 'element-plus': ['element-plus'],
- 'vue-vendor': ['vue', 'vue-router', 'pinia'],
- 'logicflow': ['@logicflow/core', '@logicflow/extension']
- }
- }
- }
- },
- server: {
- port: 3000,
- proxy: {
- '/api': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- },
- '/uploads': {
- target: 'http://localhost:8080',
- changeOrigin: true
- },
- '/analysis': {
- target: 'http://localhost:8080',
- changeOrigin: true
- }
- }
- }
- }))
|