27 lines
696 B
JavaScript
27 lines
696 B
JavaScript
const config = require("./src/json/default.json")['setting'];
|
|
const apiJsonPath = config['apiPath']
|
|
//
|
|
module.exports = {
|
|
lintOnSave: false,//关闭es
|
|
publicPath: './',
|
|
outputDir: config['dir'],
|
|
devServer: {
|
|
host: config["defaultIp"],
|
|
port: parseInt(config["port"]),
|
|
proxy: {
|
|
[apiJsonPath]: {
|
|
target: config["redirectApiPath"],
|
|
changeOrigin: true,
|
|
pathRewrite: {
|
|
[apiJsonPath]: config["redirectApiDefaultPath"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
productionSourceMap: false,
|
|
chainWebpack: (config) => {
|
|
config.plugins.delete('prefetch');
|
|
}
|
|
|
|
}
|