Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting base-href on build Flutter Web

how do i set the base href on build? I tried

--base-href /path/
--base-href=/path/
--base-href="/path/"
--base-href='/path/'

and none works

it keeps telling me base-href should start and end with /

like image 957
Seiko Santana Avatar asked Dec 22 '25 05:12

Seiko Santana


2 Answers

This does the trick...

flutter build web --base-href "/path/"
like image 72
Björn Avatar answered Dec 23 '25 18:12

Björn


If you use Windows MSYS (git bash, mingw, etc) you should use env MSYS_NO_PATHCONV=1:

$ MSYS_NO_PATHCONV=1 flutter build web --release \
    --base-href="/openapi_generator_flutter/"
like image 44
Vladimir Koltunov Avatar answered Dec 23 '25 17:12

Vladimir Koltunov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!