File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
crates/rspack_plugin_mf/src/manifest Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -288,10 +288,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> {
288288 if entry. requiredVersion . is_none ( ) {
289289 entry. requiredVersion = opt. required_version . clone ( ) ;
290290 }
291- if entry. version . is_empty ( ) {
292- if let Some ( cfg_ver) = opt. version . clone ( ) {
293- entry. version = cfg_ver;
294- }
291+ if let Some ( cfg_ver) = opt. version . clone ( ) . filter ( |_| entry. version . is_empty ( ) ) {
292+ entry. version = cfg_ver;
295293 }
296294 }
297295 let targets = shared_module_targets. entry ( pkg. clone ( ) ) . or_default ( ) ;
@@ -347,10 +345,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> {
347345 if entry. requiredVersion . is_none ( ) {
348346 entry. requiredVersion = opt. required_version . clone ( ) ;
349347 }
350- if entry. version . is_empty ( ) {
351- if let Some ( cfg_ver) = opt. version . clone ( ) {
352- entry. version = cfg_ver;
353- }
348+ if let Some ( cfg_ver) = opt. version . clone ( ) . filter ( |_| entry. version . is_empty ( ) ) {
349+ entry. version = cfg_ver;
354350 }
355351 }
356352 record_shared_usage (
You can’t perform that action at this time.
0 commit comments