Search code examples
firebasefirebase-hosting

How to firebase hosting rewrites set to source except for images?


I want rewrite to functions, except for images, or except for "** /. *". But I could not find how to write Globs in firevase.json. Please tell me how to write

This code did not work.

"rewrites": [
    {
        "source": "!(**/.*)",
        "function": "frontend"
    }
],

Solution

  • thanks! I solved it by myself.

    this code working!

    in firevase.json

    "rewrites": [
        {
            "source": "!**/*.@(html|css|js|png|jpg|jpeg|gif)",
            "function": "app"
        }
    ],