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`, },