Make the web config optional in dioxus.toml (#2700)

This commit is contained in:
Evan Almloff authored and GitHub committed 2024-07-24 19:23:09 -07:00
1 parent 7f210633eb
commit 163586c3ff
1 file changed
+15
+15
View File
@@ -86,6 +86,7 @@ impl Platform {
pub struct DioxusConfig {
pub application: ApplicationConfig,
#[serde(default)]
pub web: WebConfig,
#[serde(default)]
@@ -191,6 +192,20 @@ pub struct WebConfig {
pub wasm_opt: WasmOptConfig,
}
impl Default for WebConfig {
fn default() -> Self {
Self {
pre_compress: true_bool(),
app: Default::default(),
https: Default::default(),
wasm_opt: Default::default(),
proxy: Default::default(),
watcher: Default::default(),
resource: Default::default(),
}
}
}
/// The wasm-opt configuration
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct WasmOptConfig {