make debug build of fullstack applications load faster by default
This commit is contained in:
1 parent
426a342700
commit
b26985ea6c
3 files changed
+75
No files matched your search
@@ -1,5 +1,7 @@
|
||||
#[cfg(feature = "plugin")]
|
||||
use crate::plugin::PluginManager;
|
||||
use crate::server::fullstack::FullstackServerEnvGuard;
|
||||
use crate::server::fullstack::FullstackWebEnvGuard;
|
||||
use crate::{cfg::Platform, WebAssetConfigDropGuard};
|
||||
|
||||
use super::*;
|
||||
@@ -60,6 +62,7 @@ impl Build {
|
||||
}
|
||||
None => web_config.features = Some(vec![web_feature]),
|
||||
};
|
||||
let _gaurd = FullstackWebEnvGuard::new(self.build.debug);
|
||||
crate::builder::build(&crate_config, false, self.build.skip_assets)?;
|
||||
}
|
||||
{
|
||||
@@ -72,6 +75,7 @@ impl Build {
|
||||
}
|
||||
None => desktop_config.features = Some(vec![desktop_feature]),
|
||||
};
|
||||
let _gaurd = FullstackServerEnvGuard::new(self.build.debug);
|
||||
crate::builder::build_desktop(&desktop_config, false, self.build.skip_assets)?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,11 @@ pub struct ConfigOptsBuild {
|
||||
#[serde(default)]
|
||||
pub release: bool,
|
||||
|
||||
/// Build with all debug info [default: false]
|
||||
#[clap(long)]
|
||||
#[serde(default)]
|
||||
pub debug: bool,
|
||||
|
||||
// Use verbose output [default: false]
|
||||
#[clap(long)]
|
||||
#[serde(default)]
|
||||
@@ -63,6 +68,7 @@ impl From<ConfigOptsServe> for ConfigOptsBuild {
|
||||
client_feature: serve.client_feature,
|
||||
server_feature: serve.server_feature,
|
||||
skip_assets: serve.skip_assets,
|
||||
debug: serve.debug,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,6 +98,11 @@ pub struct ConfigOptsServe {
|
||||
#[serde(default)]
|
||||
pub release: bool,
|
||||
|
||||
/// Build with all debug info [default: false]
|
||||
#[clap(long)]
|
||||
#[serde(default)]
|
||||
pub debug: bool,
|
||||
|
||||
// Use verbose output [default: false]
|
||||
#[clap(long)]
|
||||
#[serde(default)]
|
||||
|
||||
Reference in new issue
Block a user