cfg: expose router feature flags for web

This commit is contained in:
Jonathan Kelley 2022-03-04 14:34:25 -05:00
parent dbcd91e32f
commit 83be3df42a
2 changed files with 8 additions and 5 deletions

View file

@ -31,12 +31,12 @@ dioxus-interpreter-js = { path = "./packages/interpreter", version = "^0.0.0", o
[features]
default = ["macro", "hooks", "html"]
macro = ["dioxus-core-macro"]
# macro = ["dioxus-core-macro", "dioxus-rsx"]
macro = ["dioxus-core-macro"]
hooks = ["dioxus-hooks"]
html = ["dioxus-html"]
ssr = ["dioxus-ssr"]
web = ["dioxus-web"]
web = ["dioxus-web", "dioxus-router/web"]
desktop = ["dioxus-desktop"]
ayatana = ["dioxus-desktop/ayatana"]
router = ["dioxus-router"]

View file

@ -20,9 +20,6 @@ pub use dioxus_desktop as desktop;
#[cfg(feature = "fermi")]
pub use fermi;
// #[cfg(feature = "mobile")]
// pub use dioxus_mobile as mobile;
pub mod events {
#[cfg(feature = "html")]
pub use dioxus_html::{on::*, KeyCode};
@ -34,4 +31,10 @@ pub mod prelude {
pub use dioxus_elements::{GlobalAttributes, SvgAttributes};
pub use dioxus_hooks::*;
pub use dioxus_html as dioxus_elements;
#[cfg(feature = "router")]
pub use dioxus_router::{use_route, use_router, Link, Redirect, Router, UseRoute};
#[cfg(feature = "fermi")]
pub use fermi::{use_atom_ref, use_init_atom_root, use_read, use_set, Atom, AtomRef};
}