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 492e9388743..65212fe69fa 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 @@ -113,8 +113,11 @@ private BundleContext GetScriptContext(List bundleDefiniti var contributor = CreateContributorInstance(bundleDefinition.BundleContributorType); contributor.AddScripts(scriptContext); } + + scriptContext.BundleDefinitions.AddIfNotContains( + x => x.Source == "_framework/blazor.webassembly.js", + () => new BundleDefinition { Source = "_framework/blazor.webassembly.js" }); - scriptContext.Add("_framework/blazor.webassembly.js"); return scriptContext; } @@ -206,7 +209,7 @@ private string GenerateScriptDefinitions(BundleContext context) builder.Append($" ");