Smidge
Smidge copied to clipboard
How to automatically compile bundle in debug mode when any changes occur
Hi,
we are using Umbraco 10 including smidge for client side js and less/css bundling. What we run into trouble is when changing any js file which is in a bundle we cannot access the "fresh" code in the browser ... it stys like the bundle was defined on startup.
So my question is how can we achive at least for development that any changes occur triggers a rebuild and we can access the new bundle?
Our code we use now on startup
`services.AddSmidge(_config.GetSection("smidge"));
services.Configure<SmidgeOptions>(options =>
{
string cachebuster = _config.GetSection("Umbraco:CMS:RuntimeMinification").GetValue
options.DefaultBundleOptions.DebugOptions.FileWatchOptions.Enabled = true;
options.DefaultBundleOptions.DebugOptions.SetCacheBusterType(cacheBusterType);
options.DefaultBundleOptions.ProductionOptions.SetCacheBusterType(cacheBusterType);
options.DefaultBundleOptions.ProductionOptions.ProcessAsCompositeFile = true;
});`
Any suggestions welcome Thanks
Are you referring to back office or front-end assets?