Use case
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.
In VS Code I have the following configuration
{
"name": "portal (in subfolder)",
"type": "dart",
"request": "launch",
"program": "clients/portal/lib/main.dart",
"args": [
"--web-launch-url=http://localhost:8080/preview",
"--web-port=8080",
"--web-browser-flag=--disable-web-security",
]
},
Adding --base-href=/preview/ as an argument results in the error:
Could not find an option named "base-href".
Proposal
Add --base-href to the flutter run command.
Or maybe consider to support all flags that are supported by flutter build command, if that makes sense.
Use case
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-hrefto supply the correct subfolder the web app will be hosted at. This flag is however not available for theflutter runcommand.In VS Code I have the following configuration
{ "name": "portal (in subfolder)", "type": "dart", "request": "launch", "program": "clients/portal/lib/main.dart", "args": [ "--web-launch-url=http://localhost:8080/preview", "--web-port=8080", "--web-browser-flag=--disable-web-security", ] },Adding
--base-href=/preview/as an argument results in the error:Could not find an option named "base-href".Proposal
Add
--base-hrefto theflutter runcommand.Or maybe consider to support all flags that are supported by
flutter buildcommand, if that makes sense.