base inertia setup

This commit is contained in:
LeNei
2025-03-28 10:00:09 +01:00
parent 1f38e1818b
commit 15e834060d
25 changed files with 4683 additions and 19 deletions

17
src/config/inertia.rs Normal file
View File

@@ -0,0 +1,17 @@
use axum_inertia::{InertiaConfig, vite};
pub fn get_inertia_config(is_dev: bool) -> InertiaConfig {
if !is_dev {
vite::Production::new("frontend/dist/.vite/manifest.json", "src/main.tsx")
.unwrap()
.lang("de")
.into_config()
} else {
vite::Development::default()
.port(5173)
.main("src/main.tsx")
.lang("de")
.react() // call if using react
.into_config()
}
}