firebase 部署显示空白索引文件,未显示任何应用程序

firebase deploy showing blank index file with no app displayed

我正在尝试部署 https://github.com/r-park/todo-angular2-firebase. I haven't changed anything yet (except for pointing to my own firebase), and I'm just trying to get it to deploy. I am able to run the app locally using gulp, but when I deploy to firebase, I just see an empty white page. The index page is loading, but the app isn't running: https://minneapolis.firebaseapp.com/

的克隆

我的 src 文件是这样的:

我的 firebase.json 文件看起来就像 firebase example 只是将 "app" 更改为 "src",这是我的目录名称:

{
  "firebase": "MY-APP-NAME-HERE",
  "public": "src",
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ]
}

当我在本地 运行 时,我收到一条控制台消息:

Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.

但是我正在导入 {enableProdMode},所以我认为它应该可以工作?

我遇到的唯一控制台错误是一个我无法理解的错误:

GET https://use.typekit.net/c/7019ef/1w;aktiv-grotesk-std,2,gd9:W:n3,gdC:W:n4/l…1128a5fe934af4ba55e6671197dcad3444af3a2796420a2ac4ee887f75bbe33a3b6e13af3f 

这是导致我出现问题的原因吗?

当您在本地构建时,gulp 命令会将脚本注入 index.html。

<script src="/common.js?4743575164d30a9c3044"></script><script src="/vendor.js?4743575164d30a9c3044"></script><script src="/main.js?4743575164d30a9c3044"></script>

你应该运行

bash scripts/dist.sh

然后将 target 文件夹部署到 firebase。