Open einsli opened 10 months ago
Global context is disabled for non-wasm targets. If you don't need SSR support, you can set the default build target for your project.
If you do need SSR support, please review the docs
We ran into the same issue even with targeting wasm32-unknown-unkown
. We had to turn on the doctests feature to get it to work. Adding yewdux = { version = "0.10.0", features = ['doctests']}
got us past this issue, but it does seem odd that it's gated behind that particular feature.
@accorded-jay that feature is for internal use, and shouldn't be necessary. Can you share your project, or a minimal reproduction?
Using global in non-wasm targets can introduce unexpected behavior, and is not recommended.
I have encountered the same issue while writing a very much WASM yew lil thing.
@LucaCappelletti94 This might be happening when building the whole project, which probably defaults to your native target. You should be able to compile by specifying the target for your wasm crate only. However, I can see how this might get cumbersome.
Will see about a qol improvement here
I think it is a rust analyzer issue, which currently does not seem to support the config files for subcrates.
Yes, trunk builds fine but rust analyzer complains.
I write code with given example Default Value, an error occured
here is my code
here is the Cargo.toml
I want to know if I should turn on a certain feature?