将Quasar应用程序部署到Firebase时为空白页

时间:2020-10-10 04:57:21

标签: firebase vue.js quasar-framework

我正在使用Quasar "^1.14.1",并且正在尝试部署到Firebase。我首先使用quasar build -m spa进行构建,并且部署成功。但是,结果页面为空白。

这是我的firebase.json

{
  "hosting": {
    "headers": [{
        "source": "/**",
        "headers": [{
          "key": "Cache-Control",
          "value": "no-cache, no-store, must-revalidate"
        }]
      },
      {
        "source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)",
        "headers": [{
          "key": "Cache-Control",
          "value": "max-age=604800"
        }]
      }
    ],
    "site": "mysitename",
    "public": "dist/spa",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [{
      "source": "**",
      "destination": "/dist/spa/index.html"
    }]
  }
}

我还尝试将目的地更改为"/index.html"。没有运气。我不确定该怎么办。在构建或部署中没有错误。

1 个答案:

答案 0 :(得分:0)

弄清楚了。我正在使用Firebase和dotenv,但忘记在.env.prod中包含Firebase凭据。