Fix embed-ui feature: correct rust-embed folder path
- Changed rust-embed folder from '../ui' to 'ui' (relative to crate root) - Added conditional imports to eliminate unused import warnings - Now UI files properly embed into botui binary during compilation - Resolves production error: 'Asset suite/index.html not found in embedded binary'
This commit is contained in:
parent
cdf8bea155
commit
a1a30adb2c
1 changed files with 2 additions and 1 deletions
|
|
@ -20,11 +20,12 @@ use tokio_tungstenite::{
|
|||
connect_async_tls_with_config, tungstenite,
|
||||
tungstenite::protocol::Message as TungsteniteMessage,
|
||||
};
|
||||
#[cfg(not(feature = "embed-ui"))]
|
||||
use tower_http::services::{ServeDir, ServeFile};
|
||||
|
||||
#[cfg(feature = "embed-ui")]
|
||||
#[derive(RustEmbed)]
|
||||
#[folder = "../ui"]
|
||||
#[folder = "ui"]
|
||||
struct Assets;
|
||||
|
||||
use crate::shared::AppState;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue