Open MadMed677 opened 1 week ago
@MadMed677 yes, the published version is quite old. you should take a dependency from git, which should be fine
Maybe I did something wrong but even if I fetch yew
from Git
and Material Yew
from Git
the result error will be the same
[dependencies]
material-yew = { git = "https://github.com/ranile/material-yew", branch="material-3" }
web-sys = "0.3.69"
yew = { git = "https://github.com/yewstack/yew", features = ["csr"] }
The error says that 32 times for every component:
cannot find function `__dummy_loader` in this scope
crate::import_material_web_module!("/md-web/radio.js")
| ------------------------------------------------------ in this macro invocation
All other implementation have the same problem
<MatButton label="Add" raised=true>{"Add one"}</MatButton>
| ^^^^^^^^^ the trait `yew::Component` is not implemented for `MatButton`, which is required by `MatButton: yew::BaseComponent`
@MadMed667 right, the git one gives you an error, I should've expected that. It can't find the modules
I suggest you clone the repo and then use a path dependency for now. You'll you invoke rollup yourself
cd build
npm install
npm run build
This should fix your JS files not available issue.
One good way of permanently solving this problem is having a build script that calls npm run build
. I would be happy to take a look at any PRs for it. I used to include build files in the repo but in light of the XZ exploit that was found, I'm not really comfortable doing that and telling others to use it. It would be best if end users invoked rollup themselves to bundle the martial components this library uses
Hello @ranile! I've faced with the problem and maybe you could help me to understand how to fix it.
Problem description
Step 1
When I'm trying to use material yew based on documentation page
I've faced with an error:
unresolved import
material_yew::MatButtonthe item is gated behind the
buttonfeature
Step 2
If I add
button
featureI see the following error:
I guess this is because I'm using a new version of
yew
which is0.21.0
and the traits has been changed since lastmaterial-yew
publish.