You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
764 B
JavaScript

module.exports = {
baseUrl: process.env.NODE_ENV === "production" ? "./" : "/",
outputDir: process.env.outputDir,
configureWebpack: config => {
if (process.env.NODE_ENV === "production") {
// 为生产环境修改配置...
config.externals = {
vue: "Vue",
vuex: "Vuex",
"vue-router": "VueRouter",
"element-ui": "ELEMENT",
devtool: "source-map"
};
} else {
// 为开发环境修改配置...
("source-map");
}
},
chainWebpack: config => {
config.plugin("html").tap(args => {
args[0].template = process.env.template;
return args;
});
}
};