小编stp*_*poa的帖子

在 Visual Studio 代码中隐藏顶部栏(禅宗模式)

在此处输入图片说明

我已经隐藏了选项卡并禁用了一些诸如行号等内容。如何摆脱包含文件名的顶部栏ProfilePrivate.tsx

zen visual-studio-code

9
推荐指数
1
解决办法
2321
查看次数

如何S3 + Cloudfrond + 2 SPA对子文件夹中的应用程序做出反应?

我想使用 S3 + Cloudfront 在子文件夹中提供 2 个不同的 React 应用程序

myapp.com/app-one/<-- 这是index.html
myapp.com/app-two/<-- 这是另一个index.html

我知道如何配置 create-react-app 和 React router 来处理这个问题。
https://create-react-app.dev/docs/deployment/#building-for-relative-paths

问题在于配置 S3 + Cloudfront 来处理重定向。

当您在浏览器中输入 url 时:
myapp.com/app-one/some-route- 它应该重定向到index.html of app-one
myapp.com/app-two/some-route- 它应该重定向到index.html ofapp-two

不幸的是,S3 只允许您定义一个后备file.html( 404)Static website hosting

我也不想使用 hashrouter:https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/api/HashRouter.md

amazon-s3 amazon-cloudfront single-page-application reactjs react-router

7
推荐指数
1
解决办法
3119
查看次数