Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading hub.js does not consider base href #298

Closed
ArinFaraj opened this issue Feb 22, 2024 · 2 comments · Fixed by #364
Closed

loading hub.js does not consider base href #298

ArinFaraj opened this issue Feb 22, 2024 · 2 comments · Fixed by #364

Comments

@ArinFaraj
Copy link

When building a Flutter web project with --base-href set to a different path, the following line does not consider it and fails as the file is supposed to be in the different path.

import init, * as wasmBindings from "/pkg/hub.js";

building a flutter project with flutter build web --release --base-href /new/ will set the base element to <base href="/new/"> in the index.html file.
I have not tested it because I am now a little busy, but perhaps making the /pkg/hub.js path relative pkg/hub.js will resolve the problem.

@temeddix
Copy link
Member

temeddix commented Feb 22, 2024

Hello @ArinFaraj , thanks for leaving your valuable opinion.

Yeah, it would be very nice to support subpaths on the web. As you said, it doesn't seem to be so hard to implement. I will look into this when I have time later. Meanwhile, any PR is welcome :)

@temeddix
Copy link
Member

I've been testing this issue for a while, and it looks like tokio_with_wasm should be also modified for base-href. It should be applied to both of these projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants