我正在努力让 SPA 将 Angular 与 Cloudflare 的 Workers Sites 结合使用。我正在按照找到的教程 here (但补充 Angular 的步骤 - 而不是 React),一切都很好,直到发布后我收到浏览器错误 - 在您的内容命名空间中找不到 index.html
到目前为止,我的故障排除让我可以链接到下面:
https://github.com/cloudflare/kv-asset-handler#servesinglepageapp
但是我不确定如何为 Angular 配置/使用此指南以解决我的上述问题。
最佳答案
wrangler.toml
文件应该在 [site].bucket
上有构建文件夹指向 ./dist/<name-of-the-project>
而不是 ./build
如指南中所示。
关于angular - 如何让 Angular 应用程序与 Cloudflare Workers - Workers Sites 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60442786/