一 vue.config.js
const path
= require("path");
const resolve = dir
=> {
return path
.join(__dirname
, dir
);
};
const BASE_URL = process
.env
.NODE_ENV === "production" ? "./" : "./"
module
.exports
= {
publicPath
: BASE_URL
outputDir
:XX
assetsDir
:XX
indexPath
:XX
pages
: {
index
: {
entry
: 'src/index/main.js',
template
: 'public/index.html',
filename
: 'index.html',
title
: 'Index Page',
chunks
: ['chunk-vendors', 'chunk-common', 'index']
},
subpage
: 'src/subpage/main.js'
}
lintOnSave
: true,
chainWebpack
: config
=> {
config
.resolve
.alias
.set("@", resolve("src"))
.set("_c", resolve("src/components"));
},
productionSourceMap
: false,
devServer
: {
proxy
: {
"/api/forum": {
target
: "http://192.168.200.81:6906",
changeOrigin
: true
},
"/api/middle": {
target
: "http://192.168.200.81:6906",
changeOrigin
: true
}
}
}
}
转载请注明原文地址: https://lol.8miu.com/read-21044.html