Open ffuugoo opened 4 years ago
Here is the error log:
error[E0433]: failed to resolve: use of undeclared type or module `wasm_bindgen`
--> src/router.rs:93:21
|
93 | T::try_from(js! { return history.state; }).unwrap_or_default()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `wasm_bindgen`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0433]: failed to resolve: use of undeclared type or module `WasmDescribe`
--> src/router.rs:93:21
|
93 | T::try_from(js! { return history.state; }).unwrap_or_default()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `WasmDescribe`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0425]: cannot find function `inform` in this scope
--> src/router.rs:93:21
|
93 | T::try_from(js! { return history.state; }).unwrap_or_default()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0425]: cannot find value `FUNCTION` in this scope
--> src/router.rs:93:21
|
93 | T::try_from(js! { return history.state; }).unwrap_or_default()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to 4 previous errors
Hm, thanks for the PR. I don't thought that it would build without cargo-web, but we may can find a way around it...
Basically, title.
I'm trying to build a simple web-app using yew (targeting
wasm32-unknown-unknown
). Right now I have a webpack-based build-system (more-or-less based on yew-wasm-pack-template).Webpack
wasm-pack-plugin
, obviously, does not usecargo-web
, butwasm-pack
. And if I depend onyew-router
in myCargo.toml
it fails duringyew-router
compilation with errors regardingjs!
macro.I've fetched
yew-router
and tried to directy build it withcargo build --target wasm32-unknown-unknown
and got the same errors. I've then installedcargo-web
and successfully built it.So, my questions is: Is it even possible to build
yew-router
without usingcargo-web
? Am I doing something wrong here?