Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

umi配置中开启keepalive后,在开启mako模式后不兼容 #671

Open
phoema opened this issue Sep 26, 2024 · 6 comments
Open

umi配置中开启keepalive后,在开启mako模式后不兼容 #671

phoema opened this issue Sep 26, 2024 · 6 comments

Comments

@phoema
Copy link

phoema commented Sep 26, 2024

提示TypeError: Cannot read properties of null (reading 'applyPlugins')
注释掉多标签插件后就正常了

@xiaohuoni
Copy link
Member

多tabs是实验性功能,不建议使用的。至于这个问题,我看看

@phoema
Copy link
Author

phoema commented Sep 27, 2024

ant-design-pro.zip
多tabs挺好用的,必须点赞,我们生产环境用了1年多了。
开启mako以后的配置文件在附件压缩包中,基于ant-design-pro可以复现。
pnpm build后报错。

@phoema
Copy link
Author

phoema commented Oct 17, 2024

怎么样有进展吗?

@xiaohuoni
Copy link
Member

xiaohuoni commented Oct 19, 2024

@phoema 哥,不好意思,我最近在现场支撑,还没看。刚刚跑了一下,没有问题,你试试这个包
myapp.zip

pnpm i&& pnpm preview

image

@phoema
Copy link
Author

phoema commented Oct 19, 2024

@xiaohuoni
抱歉,我可能没有描述清楚问题。切换为mako后,在dev是可以启动的,执行pnpm build后,打包到测试环境后出现以下问题。
页面启动后浏览器报错:
image
node_modules.pnpm\[email protected][email protected]\node_modules\react-dom\cjs\react-dom.production.min.js:188 TypeError: Cannot read properties of null (reading 'applyPlugins')

config中注释掉keepalive、tabsLayout,页面能正常打开。

我提供的4.3.24版本的umi版本中可再现。
您提供的umi4.3.27由于存在以下问题,在windows下跑不起来,我也在同时关注以下issue:
umijs/umi#12738

@xiaohuoni
Copy link
Member

@phoema 我发给你的,用 serve 访问的就是 build 之后的,一起蹲 windows 支持吧 umijs/umi-plugin-mako#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants