Skip to content

Commit

Permalink
WebMarkupMin: Replace a NullLogger by the AspNetCoreLogger (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taritsyn authored Feb 7, 2025
1 parent 6b75933 commit 3866f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Miniblog.Core

using IWmmLogger = WebMarkupMin.Core.Loggers.ILogger;
using MetaWeblogService = Services.MetaWeblogService;
using WmmNullLogger = WebMarkupMin.Core.Loggers.NullLogger;
using WmmAspNetCoreLogger = WebMarkupMin.AspNetCoreLatest.AspNetCoreLogger;

public class Startup
{
Expand Down Expand Up @@ -134,6 +134,7 @@ public void ConfigureServices(IServiceCollection services)
});

// HTML minification (https://github.com/Taritsyn/WebMarkupMin)
services.AddSingleton<IWmmLogger, WmmAspNetCoreLogger>(); // Used by HTML minifier
services
.AddWebMarkupMin(
options =>
Expand All @@ -147,7 +148,6 @@ public void ConfigureServices(IServiceCollection services)
options.MinificationSettings.RemoveOptionalEndTags = false;
options.MinificationSettings.WhitespaceMinificationMode = WhitespaceMinificationMode.Safe;
});
services.AddSingleton<IWmmLogger, WmmNullLogger>(); // Used by HTML minifier

// Bundling, minification and Sass transpiration (https://github.com/ligershark/WebOptimizer)
services.AddJsEngineSwitcher(options =>
Expand Down

0 comments on commit 3866f01

Please sign in to comment.