mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-29 23:50:20 +00:00
Make the web config optional in dioxus.toml (#2700)
This commit is contained in:
parent
7f210633eb
commit
163586c3ff
1 changed files with 15 additions and 0 deletions
|
@ -86,6 +86,7 @@ impl Platform {
|
||||||
pub struct DioxusConfig {
|
pub struct DioxusConfig {
|
||||||
pub application: ApplicationConfig,
|
pub application: ApplicationConfig,
|
||||||
|
|
||||||
|
#[serde(default)]
|
||||||
pub web: WebConfig,
|
pub web: WebConfig,
|
||||||
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
@ -191,6 +192,20 @@ pub struct WebConfig {
|
||||||
pub wasm_opt: WasmOptConfig,
|
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
|
/// The wasm-opt configuration
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||||
pub struct WasmOptConfig {
|
pub struct WasmOptConfig {
|
||||||
|
|
Loading…
Reference in a new issue