How to specify build arguments for 'firebase deploy' command used for hosting
Asked Answered
S

1

3

I am using firebase hosting to host my flutter web app. Everytime I run firebase deploy or flutter deploy --only hosting, it builds the web app using flutter build web. How to give arguments to flutter build web here.

While deploying, I want to build my app with these arguments : flutter build web --web-renderer html --release to solve network image error.

OR

Is there any way I can tell firebase deploy to stop running flutter build web and just use existing build which I created using the arguments of my choice.

Sash answered 6/6, 2023 at 6:15 Comment(0)
D
1

Without using firebase experimental support for Flutter in the latest versions of firebase-cli, we used to run

flutter build web --renderer canvaskit

Then in firebase.json file, specify the directory where your HTML files are located using public json key.

I'm looking for a way to specify the --renderer param in the firebase deploy command.

{
  "hosting": {
    "public": "build/web",
    "site": "site-name",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}
Dabber answered 6/6, 2023 at 10:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.