角度Firebase托管无法正常工作

时间:2018-07-12 11:30:11

标签: angular firebase deployment

我正在遵循this tutorial来构建角度应用程序。 我在Firebase上创建了项目,并成功部署了它。

i  deploying hosting
i  hosting: preparing dist/test-app directory for upload...
+  hosting: 7 files uploaded successfully

  • Deploy complete!

Project Console: https://console.firebase.google.com/project/test-app-38199/overview Hosting URL: https://test-app-38199.firebaseapp.com

我的firebase.json是这样的:

{
    "hosting": {
        "public": "dist/test-app",
        "ignore": [
            "firebase.json",
            "**/.*",
            "**/node_modules/**"
        ],
        "rewrites": [
            {
                "source": "**",
                "destination": "/index.html"
            }
        ]
    }
}

但是,在浏览器中我只能看到以下内容:

enter image description here

1 个答案:

答案 0 :(得分:0)

我遇到了类似的问题,Angular应用程序不再与Firebase兼容。我可以在其他任何地方托管我的角度应用程序,并且可以正常运行,但是将其部署到公用文件夹后,该应用程序将无法运行。就像Google故意禁用Angular一样。