多个 Angular 项目托管在单个 Firebase 项目上

Multiple Angular Project hosting on a single Firebase project

我正在考虑在单个 Firebase 项目(例如 https://aaaaa.firebaseapp.com/)下托管包含多个 Angular 项目的投资组合网站。假设我有 3 angular 个应用程序(abc、def 和 ghi)。我将在一个投资组合登录页面上显示它们并在 firebase 上托管。 例如https://aaaaa.firebaseapp.com/abc https://aaaaa.firebaseapp.com/def https://aaaaa.firebaseapp.com/ghi 如何做到这一点,甚至有可能做到这一点?请提出建议。

Firebase Hosting 支持每个项目有多个站点。然后,您可以将每个站点配置为在路径下提供服务。

{
  "hosting": [ {
      "target": "blog",  // "blog" is the applied target name for the Hosting site "myapp-blog"
      "public": "blog/dist",  // contents of this folder are deployed to the site "myapp-blog"

      // ...
    },
    {
      "target": "app",  // "app" is the applied target name for the Hosting site "myapp-app"
      "public": "app/dist",  // contents of this folder are deployed to the site "myapp-app"

      // ...

      "rewrites": [...]  // You can define specific Hosting configurations for each site
    }
  ]
}

https://firebase.google.com/docs/hosting/multisites#define_hosting_config