-
Notifications
You must be signed in to change notification settings - Fork 254
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
Console warning: using deprecated parameters for the initialization function; pass a single object instead #905
Comments
Would previous versions also accept an object? |
Just checked, look like it doesn't. So we indeed need to eval the version. |
I don't think this completely fixes the issue. I've been getting this console warning when starting web workers with gloo-worker, and traced it back to a temporary file containing
(The exact URLs don't matter.) I'm fairly certain the file was generated by trunk/src/pipelines/rust/mod.rs Lines 656 to 658 in 4c9d85f
Edit: I half take it back, I found where the file was generated in gloo-worker, I'll submit an issue there. Though the above code still should probably use the new format for trunk/examples/webworker/src/bin/app.rs Lines 12 to 16 in 4c9d85f
|
When running a Leptos CSR app with Trunk in the browser, I always get this warning in the console:
It is triggered by the
__wbg_init
function in the JS file:Because the argument to this function in
index.html
is a string instead of an object:I tracked this down to this commit in
wasm-bindgen
, which is shipped in v0.2.93 and onwards. The corresponding pull request is rustwasm/wasm-bindgen#3995.The corresponding code in Trunk are these lines:
trunk/src/pipelines/rust/output.rs
Lines 140 to 141 in ce872ce
I think we can maybe change the second line to pass an object instead of a string, but we need to be careful not to break compatibility with
wasm-bindgen
before v0.2.93. I might investigate this later and open a PR for this.The text was updated successfully, but these errors were encountered: