CSS provided by js-wrapping crate #983
Unanswered
temportalflux
asked this question in
Q&A
Replies: 1 comment
-
That would be interesting indeed. IIRC, there had been a discussion about this for other assets as well (images, …). Currently, there is not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a crate which contains my wasm_bindgen / bindings for a javascript library that I want to access in rust (e.g. to wrap React components in Yew). That crate contains javascript which is automatically picked-up by trunk via JS-Snippets from wasm_bindgen. It also contains a css/scss file that I want to make sure gets picked up. Now I could explicitly reference the path to that stylesheet file via
<link data-trunk rel="css" href="path/to/crate/in/local/filesystem/src/module.css" />
, but that requires manual maintenance and the expectation that the crate is cloned locally (not accessed via crate version or repository in cargo). Is it possible to provide some metadata to trunk in that library crate indicating that there is a css file to include? If not, perhaps some annotation in the Cargo.toml file of the lib with a[trunk]
section could be used to point to additional styles or assets for trunk to pick up?Beta Was this translation helpful? Give feedback.
All reactions