web端产品库 vite版本

This commit is contained in:
aixianling
2022-04-27 18:18:57 +08:00
parent ee93320cad
commit 4f0178c627
172 changed files with 4520 additions and 16858 deletions

40
vite.config.js Normal file
View 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']
}
})