ligershark / WebOptimizer

A bundler and minifier for ASP.NET Core
Apache License 2.0
756 stars 113 forks source link

MinifyOnDemand Tag Helper throws Null Reference Exception #215

Open ctorx opened 2 years ago

ctorx commented 2 years ago

When setting up WebOptimizer in Startup using the ServiceExtensions methods, only one of the methods sets the static properties CssBundlingSettings and CodeBundlingSettings.

These properties are required in order for the MinifyOnDemand tag helper to work and if you don't use the AddWebOptimizer() method that takes in a CssBundlingSettings and a CodeBundlingSettings and they try to use MinifyOnDemandTagHelper, the tag will throw a null reference exception.