Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Fix web assets path #118

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Fix web assets path #118

merged 2 commits into from
Jun 29, 2021

Conversation

Robert-Steiner
Copy link
Contributor

@Robert-Steiner Robert-Steiner commented Jun 21, 2021

flutter build web and flutter run -d chrome behave differently when bundling the web assets. In flutter run -d chrome we can access an asset via http://localhost:56864/assets/assets/qambert_v0001/qambert.onnx or http://localhost:56864/assets/qambert_v0001/qambert.onnx. With flutter build web, on the other hand, we can only access an asset via http://localhost:56864/assets/assets/qambert_v0001/qambert.onnx.

There are several tickets that relate to this problem:

In this PR we change the _baseAssetUrl from /assets to /assets/assets so that it works for both commands.

@Robert-Steiner
Copy link
Contributor Author

Robert-Steiner commented Jun 21, 2021

Does not work for the wasm artifacts :(
the path is now http://localhost:56864/assets/assets/wasm_bindings/genesis_bg.wasm but it is only accessable on http://localhost:56864/assets/wasm_bindings/genesis_bg.wasm

As a quick solution we could move the wasm_bindings dir into the assets dir and wait on the results of TY-1862.
wdyt?

@Robert-Steiner
Copy link
Contributor Author

I just rebased and rechecked each target. Looks good🚀

@Robert-Steiner Robert-Steiner merged commit ff8cbfa into master Jun 29, 2021
@Robert-Steiner Robert-Steiner deleted the fix-web-assets-path branch June 29, 2021 14:10
acrrd pushed a commit that referenced this pull request Aug 24, 2021
* move wasm bindings into assets folder
acrrd pushed a commit that referenced this pull request Nov 4, 2021
* move wasm bindings into assets folder
@longtimedeveloper
Copy link

@Robert-Steiner do you know when this fix will be in the stable branch?

I'm on the current stable and have the same problems with my images. It's good that we can manually adjust the build output to work around the issue.

@acrrd
Copy link
Contributor

acrrd commented Dec 1, 2021

@Robert-Steiner do you know when this fix will be in the stable branch?

It's better if you ask on some flutter issue related to this problem.

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

Successfully merging this pull request may close these issues.

3 participants