Browse Source

Improved `Aoo.Razor` lookup way.

pull/19454/head
maliming 2 years ago
parent
commit
a57a3ecde6
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 13
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs

13
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs

@ -106,16 +106,9 @@ public class BundlingService : IBundlingService, ITransientDependency
if (!bundleConfig.InteractiveAuto)
{
string fileName;
if (bundleConfig.IsBlazorWebApp)
{
var projectDirectory = Path.GetDirectoryName(directory);
fileName = Directory.GetFiles(projectDirectory!, "App.razor", SearchOption.AllDirectories).FirstOrDefault();
}
else
{
fileName = Path.Combine(PathHelper.GetWwwRootPath(directory), "index.html");
}
var fileName = bundleConfig.IsBlazorWebApp
? Directory.GetFiles(Path.GetDirectoryName(projectFilePath)!.Replace(".Client", ""), "App.razor", SearchOption.AllDirectories).FirstOrDefault()
: Path.Combine(PathHelper.GetWwwRootPath(directory), "index.html");
await UpdateDependenciesInBlazorFileAsync(fileName, styleDefinitions, scriptDefinitions);

Loading…
Cancel
Save