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

[Bug] hash路由在electron中首次加载指定hash路由页面时不呈现页面 #12798

Open
dongjb opened this issue Nov 21, 2024 · 0 comments

Comments

@dongjb
Copy link

dongjb commented Nov 21, 2024

What happens?

  1. 使用hash路由打包时,将打包后的代码放置electron中,通过loadFile去加载指定hash的路由页面显示空白,没有进行渲染
  2. 如果在首次时进入根路由页面,然后在根路由页面的代码进行跳转是可以正常渲染的
  3. 我使用vite+react+react-router-dom创建项目然后使用hash模式是可以初次就跳转到指定hash路由页面的

CleanShot 2024-11-21 at 10 01 18@2x

CleanShot 2024-11-21 at 10 03 44@2x

Mini Showcase Repository(REQUIRED)

electron地址: https://github.com/dongjb/electron-app
umi地址:https://github.com/dongjb/my-app

Context

  • Umi Version: v4.3.34
  • Node Version: v20.10.0
  • Platform: MacOS 14.0(Intel)
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

1 participant