change config flags from ssr to server to match the features
This commit is contained in:
1 parent
69e4ebe4ed
commit
b63c14fab8
20 files changed
+80
-80
No files matched your search
@@ -7,7 +7,7 @@
|
||||
|
||||
#![allow(non_snake_case, unused)]
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
mod auth;
|
||||
|
||||
use dioxus::prelude::*;
|
||||
@@ -19,7 +19,7 @@ fn main() {
|
||||
// Hydrate the application on the client
|
||||
dioxus_web::launch_cfg(app, dioxus_web::Config::new().hydrate(true));
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
{
|
||||
use crate::auth::*;
|
||||
use axum::routing::*;
|
||||
|
||||
@@ -25,4 +25,4 @@ required-features = ["desktop"]
|
||||
[[bin]]
|
||||
name = "server"
|
||||
path = "src/server.rs"
|
||||
required-features = ["ssr"]
|
||||
required-features = ["server"]
|
||||
@@ -51,7 +51,7 @@ fn main() {
|
||||
#[cfg(feature = "web")]
|
||||
tracing_wasm::set_as_global_default();
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
launch(app);
|
||||
|
||||
@@ -8,7 +8,7 @@ use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let config = LaunchBuilder::fullstack();
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
config
|
||||
.incremental(
|
||||
IncrementalRendererConfig::default()
|
||||
@@ -16,7 +16,7 @@ fn main() {
|
||||
)
|
||||
.launch();
|
||||
|
||||
#[cfg(not(feature = "ssr"))]
|
||||
#[cfg(not(feature = "server"))]
|
||||
config.launch(|| {
|
||||
rsx! {
|
||||
Router::<Route> {}
|
||||
|
||||
@@ -50,7 +50,7 @@ fn main() {
|
||||
#[cfg(feature = "web")]
|
||||
tracing_wasm::set_as_global_default();
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
LaunchBuilder::fullstack().launch(app);
|
||||
|
||||
@@ -11,7 +11,7 @@ use dioxus_fullstack::{launch, prelude::*};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// Generate all routes and output them to the docs path
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
pre_cache_static_routes_with_props(
|
||||
@@ -37,7 +37,7 @@ fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "web", feature = "ssr")))]
|
||||
#[cfg(not(any(feature = "web", feature = "server")))]
|
||||
fn main() {}
|
||||
|
||||
#[derive(Clone, Routable, Debug, PartialEq, Serialize, Deserialize)]
|
||||
|
||||
@@ -47,7 +47,7 @@ async fn get_server_data() -> Result<String, ServerFnError> {
|
||||
fn main() {
|
||||
#[cfg(feature = "web")]
|
||||
tracing_wasm::set_as_global_default();
|
||||
#[cfg(feature = "ssr")]
|
||||
#[cfg(feature = "server")]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
launch(app);
|
||||
|
||||
Reference in new issue
Block a user