disable asset patching in cargo run for mobile

This commit is contained in:
Evan Almloff committed 2023-08-18 14:43:56 -05:00
1 parent 1c58352456
commit 1a36409922
4 files changed
+74 -8

No files matched your search

+24 -2
View File
@@ -19,11 +19,33 @@ pub fn build(
let index_file = cfg.custom_index.clone();
let root_name = cfg.root_name.clone();
let assets_head = {
#[cfg(debug_assertions)]
#[cfg(all(
debug_assertions,
any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
)
))]
{
None
}
#[cfg(not(debug_assertions))]
#[cfg(not(all(
debug_assertions,
any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
)
)))]
{
let head = crate::protocol::get_asset_root_or_default();
let head = head.join("dist/__assets_head.html");