From 28d2638a3ae27985b54d39a94728ead40d9a7dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=BB=B6=E7=A6=8F?= <> Date: Fri, 22 Aug 2025 14:34:37 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=8F=91=E5=B8=83=E6=88=90?= =?UTF-8?q?=E5=BE=AE=E5=89=8D=E7=AB=AF=E4=BE=9B=E5=8D=B1=E9=99=A9=E6=BA=90?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- vue.config.js | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.env.production b/.env.production index 0089809..1d5c46e 100644 --- a/.env.production +++ b/.env.production @@ -18,4 +18,4 @@ VUE_APP_ALL_MENU = false # VUE_APP_EXPOSES_URL="http://192.168.1.20:8090" VUE_APP_REMOTES_URL="" # 当前应用部署地址 -VUE_APP_EXPOSES_URL="/prevention" \ No newline at end of file +VUE_APP_EXPOSES_URL="/prevention/" \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 329d347..8c62e89 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ const resolve = (dir) => { return path.join(__dirname, dir); }; module.exports = defineConfig({ - publicPath: "./", + publicPath: process.env.VUE_APP_EXPOSES_URL, productionSourceMap: process.env.NODE_ENV !== "production", transpileDependencies: true, lintOnSave: true, // 在保存时校验格式 @@ -62,9 +62,20 @@ module.exports = defineConfig({ .plugin("module-federation-plugin") .use(require("webpack").container.ModuleFederationPlugin, [ { - name: "test", - filename: "test.js", - + name: "prevention", + filename: "prevention.js", + exposes: { + "./majorHazard": + "./src/views/responsibility/majorHazard/majorHazard.component.vue", // 包保责任制 + "./checkTasks": + "./src/views/responsibility/checkTasks/checkTasks.component.vue", // 排查任务 + "./checkResumption": + "./src/views/estimate/checkResumption.component.vue", // 排查任务履职情况 + "./hiddendangerResumption": + "./src/views/estimate/hiddendangerResumption.component.vue", // 隐患执行履职情况 + "./publicityResumption": + "./src/views/estimate/publicityResumption/publicityResumption.component.vue", // 履职情况公示 + }, remotes: { common: `common@${process.env.VUE_APP_REMOTES_URL}/common.js`, },