mirror of
https://github.com/LeNei/axum-sqlx-template.git
synced 2026-02-13 22:56:19 +00:00
base inertia setup
This commit is contained in:
17
src/config/inertia.rs
Normal file
17
src/config/inertia.rs
Normal 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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user