EMS2.0-Documents/1.源代码/前端源代码/IEMS/vue.config.js

48 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-11-28 09:29:02 +08:00
const path = require("path");
module.exports = {
publicPath: "./",
chainWebpack: config => {
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.test(/\.svg$/)
.include.add(path.resolve(__dirname, './src/icons')).end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
const fileRule = config.module.rule('file')
fileRule.uses.clear()
fileRule
.test(/\.svg$/)
.exclude.add(path.resolve(__dirname, './src/icons'))
.end()
.use('file-loader')
.loader('file-loader')
},
// configureWebpack: {
// externals: {
// AMap: "AMap", // 高德地图配置
// },
// },
transpileDependencies: [
"./node_modules//data-view/lib/mixin/autoResize.js",
/[/\\]node_modules[/\\](.+?)?_@jiaminghi_data-view@2.10.0@@jiaminghi(.*)[/\\]data-view/,
],
devServer: {
https: false,
proxy: {
"/api": {
// target: 'http://192.168.0.33:3000/', //对应自己的接口
target: "http://116.236.50.103:3000/", //对应自己的接口
changeOrigin: true,
ws: true,
pathRewrite: {
"^/api": "",
},
},
},
},
};