fix fullstack build bug when --release (#3078)

* rust 1.82.0 doesn't allow custom profile when release build
This commit is contained in:
hackartist 2024-10-21 04:21:13 +09:00 committed by GitHub
parent 21d7916d56
commit 306fbe2e75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ impl BuildRequest {
fn new_server(serve: bool, config: &DioxusCrate, build: &Build) -> Self {
let mut build = build.clone();
if build.profile.is_none() {
if !build.release && build.profile.is_none() {
build.profile = Some(CLIENT_PROFILE.to_string());
}
let client_feature = build.auto_detect_server_feature(config);
@ -113,7 +113,7 @@ impl BuildRequest {
fn new_client(serve: bool, config: &DioxusCrate, build: &Build) -> Self {
let mut build = build.clone();
if build.profile.is_none() {
if !build.release && build.profile.is_none() {
build.profile = Some(SERVER_PROFILE.to_string());
}
let (client_feature, client_platform) = build.auto_detect_client_platform(config);