代码拉取完成,页面将自动刷新
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"
];
}
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。