123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const {defineConfig} = require('@vue/cli-service');
- const path = require("path");
- const setting = require('./src/util/setting')
- module.exports = defineConfig({
- publicPath: './',
- transpileDependencies: true,
- productionSourceMap: false,
- configureWebpack: {
- plugins: [],
- },
- chainWebpack: (config) => {
- // 内置的svg处理排除指定目录下的文件
- config.module.rules.delete('svg')
- config.module
- .rule("svg-sprite-loader")
- .test(/\.svg$/)
- .include
- .add(path.join(__dirname, "src/components/icon"))
- .end()
- .use("svg-sprite-loader")
- .loader("svg-sprite-loader")
- .options({symbolId: "icon-[name]",});
- },
- devServer: {
- client: {overlay: false},
- proxy: {
- "/etl-api": {
- target: setting.etlUrl + "/etl-api",
- ws: true,
- pathRewrite: {"^/etl-api": "/",},
- },
- "/api": {
- target: setting.host + "/api",
- ws: true,
- pathRewrite: {"^/api": "/",},
- },
- "/bi-api": {
- target: setting.host + "/bi-api",
- ws: true,
- pathRewrite: {"^/bi-api": "/",},
- }
- }
- }
- });
|