You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/*
* index
*
* @Author: ShanZhu
* @Date: 2023-11-23
*/
'use strict'
const path = require ( 'path' )
module . exports = {
dev : {
// Paths
assetsSubDirectory : 'static' ,
assetsPublicPath : '/' ,
proxyTable : {
'/api' : {
target : 'http://localhost:8087' , //本地地址
changeOrigin : true ,
pathRewrite : {
'^/api' : '' //这里理解成用‘/api’ 代替target里面的地址, 后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’ 即可
}
}
} ,
host : 'localhost' ,
port : 8088 ,
autoOpenBrowser : false ,
errorOverlay : true ,
notifyOnErrors : true ,
poll : false ,
devtool : 'cheap-module-eval-source-map' ,
cacheBusting : true ,
cssSourceMap : true
} ,
build : {
index : path . resolve ( _ _dirname , '../dist/index.html' ) ,
// Paths
assetsRoot : path . resolve ( _ _dirname , '../dist' ) ,
assetsSubDirectory : 'static' ,
assetsPublicPath : '/' ,
productionSourceMap : true ,
// https://webpack.js.org/configuration/devtool/#production
devtool : '#source-map' ,
productionGzip : false ,
productionGzipExtensions : [ 'js' , 'css' ] ,
bundleAnalyzerReport : process . env . npm _config _report
}
}