1 Star 0 Fork 298

小E/CRMEB-H5

forked from 众邦科技/CRMEB-H5 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
等风来,随风去 提交于 2019-08-29 10:43 . 上传开源H5
const path = require("path");
const HardSourceWebpackPlugin = require("hard-source-webpack-plugin");
const AutoDllPlugin = require("autodll-webpack-plugin");
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
assetsDir: "h5",
configureWebpack: config => {
Object.assign(config.resolve.alias, {
"@utils": resolve("src/utils"),
"@libs": resolve("src/libs"),
"@api": resolve("src/api"),
"@components": resolve("src/components"),
"@assets": resolve("src/assets"),
"@css": resolve("src/assets/css"),
"@images": resolve("src/assets/images"),
"@views": resolve("src/views"),
"@mixins": resolve("src/mixins")
});
if (process.env.NODE_ENV !== "production") {
config.plugins.push(
new HardSourceWebpackPlugin(),
new AutoDllPlugin({
inject: true,
debug: true,
filename: "[name]_[hash].js",
path: "./dll" + Date.parse(new Date()),
entry: {
vendor_vue: ["vue", "vuex", "vue-router"],
vendor_ui: ["vue-awesome-swiper", "vue-ydui"],
vendor_tools: ["axios", "core-js"]
}
})
);
}
},
chainWebpack: config => {
config.plugin("html").tap(args => {
args[0].VUE_APP_NAME = process.env.VUE_APP_NAME;
return args;
});
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/evidwong/CRMEB-H5.git
git@gitee.com:evidwong/CRMEB-H5.git
evidwong
CRMEB-H5
CRMEB-H5
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385