File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " cli.rs " : patch
3+ ---
4+
5+ Check if distDir assets are built after running ` beforeDevCommand ` .
Original file line number Diff line number Diff line change @@ -64,14 +64,6 @@ impl Build {
6464 let config_guard = config. lock ( ) . unwrap ( ) ;
6565 let config_ = config_guard. as_ref ( ) . unwrap ( ) ;
6666
67- let web_asset_path = PathBuf :: from ( & config_. build . dist_dir ) ;
68- if !web_asset_path. exists ( ) {
69- return Err ( anyhow:: anyhow!(
70- "Unable to find your web assets, did you forget to build your web app? Your distDir is set to \" {:?}\" ." ,
71- web_asset_path
72- ) ) ;
73- }
74-
7567 if let Some ( before_build) = & config_. build . before_build_command {
7668 if !before_build. is_empty ( ) {
7769 logger. log ( format ! ( "Running `{}`" , before_build) ) ;
@@ -92,6 +84,14 @@ impl Build {
9284 }
9385 }
9486
87+ let web_asset_path = PathBuf :: from ( & config_. build . dist_dir ) ;
88+ if !web_asset_path. exists ( ) {
89+ return Err ( anyhow:: anyhow!(
90+ "Unable to find your web assets, did you forget to build your web app? Your distDir is set to \" {:?}\" ." ,
91+ web_asset_path
92+ ) ) ;
93+ }
94+
9595 rust:: build_project ( self . debug ) ?;
9696
9797 let app_settings = rust:: AppSettings :: new ( & config_) ?;
You can’t perform that action at this time.
0 commit comments