当我将本地CSS用于捆绑软件时,它像这样正常工作
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ICacheHelper fillCache)
{
app.UseBundling(bundles =>
{
bundles.AddCss("/Test.css")
.Include("~/css/sweetalert.min.css")
.Include("~/css/responsive.css");
});
}
在Startup中。当我使用CDN链接捆绑其不起作用时,我得到一个空文件捆绑CSS。
public IWebHostEnvironment webHost { get; }
public Startup(IWebHostEnvironment webHostEnvironment)
{
webHost = webHostEnvironment;
}
public void ConfigureServices(IServiceCollection services)
{
services.AddBundling()
.UseDefaults(webHost)
.UseNUglify();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ICacheHelper fillCache)
{
app.UseBundling(bundles =>
{
bundles.AddCss("/Test.css")
.Include("https://dk4umlpu.clo....ud.net/2.0/css/sweetalert.min.css")
.Include("https://dk4umlpu.clo....ud.net/2.0/css/responsive.css");
});
}