32 lines
549 B
TypeScript
32 lines
549 B
TypeScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
||
|
|
import { resolve } from 'path'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [uni()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@': resolve(__dirname, './')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
port: 5173,
|
||
|
|
host: '0.0.0.0',
|
||
|
|
proxy: {
|
||
|
|
'/api': {
|
||
|
|
target: 'http://localhost:9010',
|
||
|
|
changeOrigin: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
build: {
|
||
|
|
minify: 'terser',
|
||
|
|
terserOptions: {
|
||
|
|
compress: {
|
||
|
|
drop_console: true,
|
||
|
|
drop_debugger: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|