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

Allow .wasm to be resolved by assetPlugin. #7575

Closed
4 tasks done
xzdarcy opened this issue Apr 2, 2022 · 2 comments
Closed
4 tasks done

Allow .wasm to be resolved by assetPlugin. #7575

xzdarcy opened this issue Apr 2, 2022 · 2 comments

Comments

@xzdarcy
Copy link

xzdarcy commented Apr 2, 2022

Clear and concise description of the problem

I want to get resolved URL string when Importing .wasm file from JS. Because some libraries have their own Webassembly loader.
I have the following configuration, but it doesn't work.

  assetsInclude: [/.wasm$/]

Suggested solution

Is it possible to put assetPlugin in front of wasmPlugin?
from
image
to

...
assetPlugin(config),
wasmPlugin(config),
...

Alternative

No response

Additional context

No response

Validations

@sapphi-red
Copy link
Member

FYI you can get url by doing this.

import wasmUrl from 'path/to/somewhere.wasm?url'

@sapphi-red
Copy link
Member

Also there is simillar infomation about this at #4551.

@xzdarcy xzdarcy closed this as completed Apr 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants