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

生产环境切换子应用,styled-components的样式丢失 #1224

Open
AmorDiamond opened this issue May 16, 2024 · 0 comments
Open

生产环境切换子应用,styled-components的样式丢失 #1224

AmorDiamond opened this issue May 16, 2024 · 0 comments

Comments

@AmorDiamond
Copy link

AmorDiamond commented May 16, 2024

问题描述

生产环境子应用使用了styled-components,切换其他子应用后再访问使用了styled-components的应用样式丢失。本地开发环境不会出现该问题。

复现步骤

1.子应用a使用了styled-components创建组件,先访问a应用,首次访问子应用a是存在样式的。
2.路由跳转切换到其他子应用。
3.再路由跳转切换回子应用a,此时子应用a的styled-components组件样式丢失了。

上传截图

第一次访问子应用a有样式

image

切换其他子应用后再切换回子应用a,样式丢失

image

复现仓库

请提供一个精简的代码仓库,然后上传到自己的 github,以帮助我们复现您的问题。

环境信息

  • micro-app版本:1.0.0-rc.4
  • 主应用前端框架&版本:react 18.2.0
  • 子应用前端框架&版本:react 18.2.0
  • 构建工具&版本:vite 5.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants