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

umijs 怎么打包配置多个页面呢? #12402

Closed
cangsnage opened this issue May 16, 2024 · 1 comment
Closed

umijs 怎么打包配置多个页面呢? #12402

cangsnage opened this issue May 16, 2024 · 1 comment

Comments

@cangsnage
Copy link

Background

umijs打包配置一个index.html和index2.html文件,我想问下这个应该用entry来配置入口文件么,因为我这边看文档并么有?

Proposal

我希望的打包后index.html打开的文件菜单是a菜单,index2.html菜单是b菜单
image
image
显示不同菜单应该怎么做呢

Additional context

Add any other context or screenshots about the feature request here.

@fz6m
Copy link
Member

fz6m commented May 18, 2024

通常情况下,umi 打包不了多个页面,因为 umi 是个 SPA 的框架,产物只有一个 index.html ,所有的请求都要 fallback 到这个 html 上,在 nginx 里的配置是 try_files ,所以就不需要多个 html 了。

按 SPA 的规范,访问路径上不应该有 html ,你可以根据路径判断初次要切换到的 tab 。

@fz6m fz6m closed this as completed May 18, 2024
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