微前端架构下,单独打包某个子应用,打包产物异常 #12148
Replies: 1 comment
-
加上base: '/',后ok了 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
主应用为umimax项目,子应用为umi4,子应用可以正常单独开发、微前端开发。但对子应用进行单独打包后,使用serve开启本地静态服务,没有对应页面结构,并且只导入了umi.js文件。
子应用配置:
import { defineConfig } from 'umi'; export default defineConfig({ routes: [{ path: '/', component: 'index' }], npmClient: 'pnpm', plugins: ['@umijs/plugins/dist/qiankun'], qiankun: { slave: {}, }, // mfsu umi无法触发子包热更新 mfsu: false, monorepoRedirect: { srcDir: ['../src'] }, mountElementId: 'deye', // 容器ID });
不知道有大佬了解是什么原因吗?哪里缺了配置吗?
Beta Was this translation helpful? Give feedback.
All reactions