1 Star 0 Fork 0

codesman/test-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 2.04 KB
一键复制 编辑 原始数据 按行查看 历史
zzz 提交于 2020-07-23 14:17 . add image recognition
const devServerPort = 8001;
// const devApiHost = "http://localhost:8100";
const devApiHost = "https://api.bltools.bailian-ai.com";
const prodApiHost = "https://api.bltools.bailian-ai.com";
const resolve = dir => require("path").join(__dirname, dir);
module.exports = {
publicPath: "/",
outputDir: "dist",
lintOnSave: false,
runtimeCompiler: true,
chainWebpack: config => {
config.resolve.alias.set("@", resolve("src")),
config.resolve.alias.set("@components", resolve("src/components")),
config.resolve.alias.set("@assets", resolve("src/assets")),
config.resolve.alias.set("@layout", resolve("src/layout")),
config.resolve.alias.set("@utils", resolve("src/utils")),
config.resolve.alias.set("@views", resolve("src/views")),
config.resolve.alias.set("@config", resolve("src/config"));
},
devServer: {
open: true,
host: "0.0.0.0",
port: devServerPort,
overlay: {
warnings: false,
errors: true
},
proxy: {
"/development": {
target: devApiHost,
changeOrigin: true,
ws: true,
pathRewrite: {
"^/development": ""
}
},
"/prod": {
target: prodApiHost,
changeOrigin: true,
ws: true,
pathRewrite: {
"^/prod": ""
}
}
}
},
configureWebpack: config => {
if (process.env.NODE_ENV === "production") {
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false;
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true;
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = [
"console.log"
];
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zzserver/test-vue.git
git@gitee.com:zzserver/test-vue.git
zzserver
test-vue
test-vue
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385