![]() |
VOOZH | about |
dotnet add package Umbraco.Community.Smidge --version 2.0.0
NuGet\Install-Package Umbraco.Community.Smidge -Version 2.0.0
<PackageReference Include="Umbraco.Community.Smidge" Version="2.0.0" />
<PackageVersion Include="Umbraco.Community.Smidge" Version="2.0.0" />Directory.Packages.props
<PackageReference Include="Umbraco.Community.Smidge" />Project file
paket add Umbraco.Community.Smidge --version 2.0.0
#r "nuget: Umbraco.Community.Smidge, 2.0.0"
#:package Umbraco.Community.Smidge@2.0.0
#addin nuget:?package=Umbraco.Community.Smidge&version=2.0.0Install as a Cake Addin
#tool nuget:?package=Umbraco.Community.Smidge&version=2.0.0Install as a Cake Tool
This project restores the RuntimeMinifier functionality to Umbraco v16.1.1+, powered by Smidge. The RuntimeMinifier was removed in Umbraco v14, and this package reintroduces it for developers who need runtime minification of CSS and JavaScript assets.
dotnet add package Umbraco.Community.Smidge
Add .AddRuntimeMinifier() to your UmbracoBuilder:
// In your Startup or Program.cs
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddComposers()
.AddRuntimeMinifier()
.Build();
And add app.UseSmidge();
// In your Startup or Program.cs
app.UseSmidge();
await app.RunAsync();
Use the IRuntimeMinifier interface to minify assets at runtime.
// Example usage in a notification handler
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Services;
using Umbraco.Community.Smidge;
public class CreateBundlesNotificationHandler : INotificationHandler<UmbracoApplicationStartingNotification>
{
private readonly IRuntimeMinifier _runtimeMinifier;
private readonly IRuntimeState _runtimeState;
public CreateBundlesNotificationHandler(IRuntimeMinifier runtimeMinifier, IRuntimeState runtimeState)
{
_runtimeMinifier = runtimeMinifier;
_runtimeState = runtimeState;
}
public void Handle(UmbracoApplicationStartingNotification notification)
{
if (_runtimeState.Level == RuntimeLevel.Run)
{
_runtimeMinifier.CreateJsBundle("core-javascript-bundle",
BundlingOptions.OptimizedNotComposite,
["~/scripts/main.min.js"]);
_runtimeMinifier.CreateCssBundle("core-style-bundle",
BundlingOptions.OptimizedNotComposite,
["~/css/bootstrap.min.css", "~/css/main.min.css"]);
}
}
}
BundlingOptions, RuntimeMinificationSettings, etc.).Contributions are welcome! Please submit issues or pull requests via GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
For more information, see the source code and comments in this repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 5,503 | 11/27/2025 |
| 2.0.0-rc2 | 234 | 11/25/2025 |
| 2.0.0-rc1 | 238 | 11/24/2025 |
| 2.0.0-beta.1 | 210 | 10/31/2025 |
| 1.0.0 | 506 | 7/30/2025 |