-
Notifications
You must be signed in to change notification settings - Fork 82
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
Can't resolve 'wasmer_wasi_js_bg.wasm' #290
Comments
Is this Webpack 5? I would recommend declaring |
Actually, looking at my own |
webpack: 5.67.0
webpack-cli: 4.9.2 I rolled back to |
well ofc 0.12.0 did not have any wasm component. I looked at the code a little bit, the wasm should be dataurl-packed into the JS, but for some reason there is still a URL pointing at the code. I believe this can be worked around using externals (https://webpack.js.org/configuration/externals/) to make webpack ignore the missing file, since it will not actually be required at runtime. Have to try myself with Webpack later. |
I managed to convince Webpack with the following externals: {
'wasmer_wasi_js_bg.wasm': true
} Clearly a bit weird... @syrusakbary any idea why the line: Line 78 in 1184d7a
generates a fetch in if (typeof input === 'undefined') {
input = new URL('wasmer_wasi_js_bg.wasm', import.meta.url);
}
...
input = fetch(input); |
For anyone looking how to resolve this when using Parcel: An approach that worked for me is to use the parcel-resolver-ignore plugin (see setup docs there), and then to add "parcelIgnore": [
"wasmer_wasi_js_bg.wasm"
] to |
* wasmer_wasi_js_bg.wasm がない * [Can't resolve 'wasmer_wasi_js_bg.wasm' · Issue #290 · wasmerio/wasmer-js](wasmerio/wasmer-js#290) * ず無視リストに入れると一応動く * 標準出力をフックする方法はあるか?
This helped me resolve the issue. Thanks @corwin-of-amber for the tip. |
Trying to compile my files using webpack and getting weird error
Can't resolve 'wasmer_wasi_js_bg.wasm'
Seems it is related to
@wasmer/wasi
, please helpThe text was updated successfully, but these errors were encountered: