title: add a rewrite to firebase flutter web project to direct all calls to a cloud function
body: <p>I have this firebase.json json:</p>
  <pre><code> {
    &quot;hosting&quot;: {
      &quot;public&quot;: &quot;build/web&quot;,
      &quot;headers&quot;: [
        { &quot;source&quot;: &quot;/**&quot;, &quot;headers&quot;: [{&quot;key&quot;: &quot;Cache-Control&quot;, &quot;value&quot;: &quot;no-cache, no-store, must-revalidate&quot;}] }
          ]
        }
      ],
      &quot;ignore&quot;: [
        &quot;firebase.json&quot;,
        &quot;**/.*&quot;,
        &quot;**/node_modules/**&quot;
      ],
      &quot;rewrites&quot;: [
        {
          &quot;source&quot;: &quot;/challenge{,/**}&quot;,
          &quot;function&quot;: &quot;preRender&quot;
        },
        {
          &quot;source&quot;: &quot;/homa{,/**}&quot;,
          &quot;function&quot;: &quot;preRender&quot;
        }
      ]
    },
    &quot;emulators&quot;: {
      &quot;hosting&quot;: {
        &quot;port&quot;: 5000
      },
      &quot;ui&quot;: {
        &quot;enabled&quot;: true
      }
    },
    &quot;functions&quot;: {
      &quot;predeploy&quot;: [
        &quot;npm --prefix \&quot;$RESOURCE_DIR\&quot; run lint&quot;
      ]
    }
  }
  </code></pre>
  <p>The problem is that urls such as <a href="https://myproj-4324b.web.app/#/challenge" rel="nofollow noreferrer">https://myproj-4324b.web.app/#/challenge</a> don't trigger the <code>preRender</code> function.
  I guess everything that comes after the '#' is ignored, but I'm not sure how to configure the rewrite by the prefix.
  How can I make all the urls go through the <code>preRender</code> function?</p>