web端产品库 vite版本
This commit is contained in:
40
vite.config.js
Normal file
40
vite.config.js
Normal file
@@ -0,0 +1,40 @@
|
||||
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,
|
||||
open: true,
|
||||
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/, '')
|
||||
}
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['@jiaminghi/data-view', 'vue-ruler-tool', 'vue-json-editor']
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user