【问题标题】:Blank page when deploying Quasar app to Firebase将 Quasar 应用程序部署到 Firebase 时出现空白页面
【发布时间】:2021-01-25 03:06:55
【问题描述】:

我正在使用 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"。没有运气。我不确定还能做什么。构建或部署没有错误。

【问题讨论】:

    标签: firebase vue.js quasar-framework


    【解决方案1】:

    想通了。我正在使用 Firebase 和 dotenv,但我忘记在 .env.prod 中包含我的 Firebase 凭据。

    【讨论】:

      猜你喜欢
      • 2021-08-16
      • 2020-01-09
      • 1970-01-01
      • 2020-07-19
      • 2020-11-23
      • 2020-08-17
      • 1970-01-01
      • 2021-12-22
      • 1970-01-01
      相关资源
      最近更新 更多