Skip to content

Commit

Permalink
fix: support windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerioageno committed Mar 5, 2025
1 parent 0e597ca commit ef36f03
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/tuono/src/source_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,30 @@ use crate::route::Route;
// This fallback is used when the v8 engine fails to server side render the page
// Instead we will server this static html file so that vite can build the HTML
// and show the error boundary
#[cfg(target_os = "windows")]
const FALLBACK_HTML: &str = include_str!(r#"..\templates\fallback_index.html"#);

#[cfg(target_os = "windows")]
const SERVER_ENTRY_DATA: &str = include_str!(r#"..\templates\server_entry.ts"#);

#[cfg(target_os = "windows")]
const CLIENT_ENTRY_DATA: &str = include_str!(r#"..\templates\client_entry.ts"#);

#[cfg(target_os = "windows")]
const AXUM_ENTRY_POINT: &str = include_str!(r#"..\templates\tuono_main.rs"#);

#[cfg(not(target_os = "windows"))]
const FALLBACK_HTML: &str = include_str!("../templates/fallback_index.html");

#[cfg(not(target_os = "windows"))]
const SERVER_ENTRY_DATA: &str = include_str!("../templates/server_entry.ts");

#[cfg(not(target_os = "windows"))]
const CLIENT_ENTRY_DATA: &str = include_str!("../templates/client_entry.ts");

#[cfg(not(target_os = "windows"))]
const AXUM_ENTRY_POINT: &str = include_str!("../templates/tuono_main.rs");

const ROUTE_FOLDER: &str = "src/routes";
const DEV_FOLDER: &str = ".tuono";

Expand Down

0 comments on commit ef36f03

Please sign in to comment.