41 lines
687 B
TypeScript
41 lines
687 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [
|
|
react(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': 'src/'
|
|
}
|
|
},
|
|
build: {
|
|
minify: 'esbuild',
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: false,
|
|
drop_debugger: false,
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
open: true,
|
|
cors: true,
|
|
port: 7777,
|
|
hmr:{
|
|
overlay: false
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://gateway.feashow.cn',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
},
|
|
}
|
|
}
|
|
})
|