From 054e25d975414f7464b8adf73a15985b81906c51 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 22 Aug 2022 16:39:36 +0800 Subject: [PATCH] Update BundlingService --- .../Volo/Abp/Cli/Bundling/BundlingService.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 5d2e6b51f9..65212fe69f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -114,11 +114,10 @@ public class BundlingService : IBundlingService, ITransientDependency contributor.AddScripts(scriptContext); } - if (scriptContext.BundleDefinitions.All(x => x.Source != "_framework/blazor.webassembly.js")) - { - scriptContext.Add("_framework/blazor.webassembly.js"); - } - + scriptContext.BundleDefinitions.AddIfNotContains( + x => x.Source == "_framework/blazor.webassembly.js", + () => new BundleDefinition { Source = "_framework/blazor.webassembly.js" }); + return scriptContext; }