40 lines
820 B
JavaScript
40 lines
820 B
JavaScript
import { defineConfig } from 'vite'
|
||
import vue from '@vitejs/plugin-vue'
|
||
import { resolve } from 'path'
|
||
|
||
export default defineConfig({
|
||
plugins: [vue()],
|
||
base:'./',
|
||
resolve: {
|
||
alias: {
|
||
'@': resolve(__dirname, 'src')
|
||
}
|
||
},
|
||
server: {
|
||
host: '0.0.0.0',
|
||
port: 3000,
|
||
open: true,
|
||
proxy: {
|
||
'/juntech-ysdp': {
|
||
target: 'http://192.168.16.193:8888',
|
||
// (binyu使用,切换时注释上面那行,取消注释下面这行)
|
||
// target: 'http://101.133.172.2:8082',
|
||
changeOrigin: true,
|
||
rewrite: (path) => path
|
||
}
|
||
}
|
||
},
|
||
build: {
|
||
outDir: 'dist',
|
||
assetsDir: 'static',
|
||
sourcemap: false,
|
||
minify: 'terser',
|
||
terserOptions: {
|
||
compress: {
|
||
drop_console: true,
|
||
drop_debugger: true
|
||
}
|
||
}
|
||
}
|
||
})
|