Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ pub trait DioxusRouterExt<S>: DioxusRouterFnExt<S> {
Self: Sized;
}

#[cfg(not(target_arch = "wasm32"))]
impl<S> DioxusRouterExt<S> for Router<S>
where
S: Send + Sync + Clone + 'static,
{
#[cfg(not(target_arch = "wasm32"))]
fn serve_static_assets(mut self) -> Self {
use tower_http::services::{ServeDir, ServeFile};

Expand Down Expand Up @@ -116,6 +116,11 @@ where
self
}

#[cfg(target_arch = "wasm32")]
fn serve_static_assets(mut self) -> Self {
self
}

fn serve_dioxus_application(self, cfg: ServeConfig, app: fn() -> Element) -> Self {
// Add server functions and render index.html
let server = self
Expand Down