Updated css loading to use the new bundler
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5269",
|
||||
"commandLineArgs": "--frontend-asset /css/MoonlightServers.min.css",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"MOONLIGHT_APP_PUBLICURL": "http://localhost:5269"
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
using MoonCore.Extensions;
|
||||
using Moonlight.ApiServer.Interfaces.Startup;
|
||||
using Moonlight.ApiServer.Services;
|
||||
|
||||
namespace MoonlightServers.ApiServer.Startup;
|
||||
|
||||
public class PluginStartup : IAppStartup
|
||||
{
|
||||
private readonly ILogger<PluginStartup> Logger;
|
||||
private readonly BundleService BundleService;
|
||||
|
||||
public PluginStartup(ILogger<PluginStartup> logger)
|
||||
public PluginStartup(ILogger<PluginStartup> logger, BundleService bundleService)
|
||||
{
|
||||
Logger = logger;
|
||||
BundleService = bundleService;
|
||||
}
|
||||
|
||||
public Task BuildApp(IHostApplicationBuilder builder)
|
||||
@@ -17,6 +20,8 @@ public class PluginStartup : IAppStartup
|
||||
// Scan the current plugin assembly for di services
|
||||
builder.Services.AutoAddServices<PluginStartup>();
|
||||
|
||||
BundleService.BundleCss("css/MoonlightServers.min.css");
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user