2022-04-27 18:18:57 +08:00
|
|
|
import {createVuePlugin} from 'vite-plugin-vue2'
|
|
|
|
|
import {defineConfig} from "vite";
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
resolve: {
|
|
|
|
|
extensions: ['.vue', '.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'],
|
|
|
|
|
},
|
|
|
|
|
plugins: [createVuePlugin({jsx: true})],
|
|
|
|
|
server: {
|
|
|
|
|
host: '0.0.0.0',
|
|
|
|
|
port: 8666,
|
2022-04-27 19:36:32 +08:00
|
|
|
open: 'index.html',
|
2022-04-27 18:18:57 +08:00
|
|
|
proxy: {
|
|
|
|
|
//设置代理,可解决跨5
|
|
|
|
|
'/lan': {
|
|
|
|
|
target: 'http://192.168.1.87:9000',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: path => path.replace(/^\/lan/, '')
|
|
|
|
|
},
|
|
|
|
|
'/omsapi': {
|
|
|
|
|
target: 'http://192.168.1.87:19898',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: path => path.replace(/^\/omsapi/, '')
|
|
|
|
|
},
|
|
|
|
|
'/ns': {
|
|
|
|
|
target: 'http://localhost:12525',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: path => path.replace(/^\/ns/, '')
|
|
|
|
|
},
|
|
|
|
|
'/xsjr': {
|
|
|
|
|
target: 'http://192.168.1.87:39898',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: path => path.replace(/^\/xsjr/, '')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|