You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Proposal] Support --base-href for flutter run #163141
I want to test my web app when it runs in a subfolder. When I build the web app, I can use the flag --base-href to supply the correct subfolder the web app will be hosted at. This flag is however not available for the flutter run command.
You can use this for a production build flutter build web --base-href /path/
Labelling this issue as a valid proposal to support base-href to run command
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
markbeij commentedon Feb 12, 2025
Workaround for now is to either
Downsides for both these workarounds are
maheshj01 commentedon Feb 13, 2025
You can use this for a production build
flutter build web --base-href /path/Labelling this issue as a valid proposal to support
base-hrefto run command[-]Support for --base-href for flutter run[/-][+][Proposal] Support `--base-href` for flutter run[/+]feat: Add --base-href support to flutter run for web (#182709)
feat: Add --base-href support to flutter run for web (flutter#182709)
github-actions commentedon Apr 7, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.feat: Add --base-href support to flutter run for web (flutter#182709)