title: Firebase hosting static site from cloud storage bucket?
body: <p>I've built a dynamic site using typescript in cloud functions. I also have cloud functions triggers, which whenever data changes in Firestore, the relevant pages recompile themselves to a static page hosted in a firebase cloud storage bucket.</p>
  <p>Bucket look something like this:</p>
  <pre><code>gs://[bucketname].appspot.com
  /app/index.html
  /app/page1.html
  /app/page2.html
  /uploads/images.webp
  ...
  </code></pre>
  <p>Currently, the static site is served through an express app within a cloud function named app. The problem here lies within the cloud function states. They aren't always hot, which makes the initial load time very slow.</p>
  <p>firebase.json</p>
  <pre><code>&quot;hosting&quot;: {
    &quot;public&quot;: &quot;public&quot;,
    &quot;rewrites&quot;: [{ &quot;source&quot;: &quot;**&quot;, &quot;function&quot;: &quot;app&quot; }],
  }
  </code></pre>
  <p>What I would like to achieve, is to have Firebase hosting point to the files from the bucket instead of having an express app within a cloud function. Something between the lines of:</p>
  <p>firebase.json</p>
  <pre><code>&quot;hosting&quot;: {
    &quot;public&quot;: &quot;public&quot;,
    &quot;rewrites&quot;: [
      { &quot;source&quot;: &quot;**/:url&quot;, &quot;destination&quot;: &quot;[BUCKETURL]/app/:url.html&quot; },
      { &quot;source&quot;: &quot;**&quot;, &quot;destination&quot;: &quot;[BUCKETURL]/app/index.html&quot; }]
  }
  </code></pre>
  <p>My URL structure is very simple, it's domain.com/page-name and I also want to keep it that way without .html at the end. Any advice would be greatly appreciated. Thank you</p>