Owain
07/23/2024, 8:13 AMservices.AddSmidge(_config)
.Configure<SmidgeOptions>(options =>
{
//specify callback for filtering the pipeline for a given web file:
options.PipelineFactory.OnGetDefault = GetDefaultPipelineFactory;
//change some of the bundle options for rendering in Debug mode:
options.DefaultBundleOptions.DebugOptions.SetCacheBusterType<AppDomainLifetimeCacheBuster>();
options.DefaultBundleOptions.DebugOptions.FileWatchOptions.Enabled = true;
//change some of the bundle options for rendering in Production mode:
options.DefaultBundleOptions.ProductionOptions.SetCacheBusterType<AppDomainLifetimeCacheBuster>();
});
From my understanding, which isn't much, I would have thought that if I am running the project locally, via Visual Studio / Kestrel, then my cache should be cleared every time I spin up the site and any JS changes I have made would be picked up. This doesn't seem to be the case.
The only thing I've found that works is if I set debug on my import e.g.
<environment names="Development">
@await SmidgeHelper.JsHereAsync(debug: true)
</environment>
<environment names="Staging,Production">
@await SmidgeHelper.JsHereAsync(debug: false)
</environment>
This works but I would prefer not to have to set this on every instance that I use the SmidgeHelper.
Anyone had similar issues?Dean Leigh
07/23/2024, 8:22 AMOwain
07/23/2024, 8:23 AMDean Leigh
07/23/2024, 8:26 AMDean Leigh
07/23/2024, 8:27 AMOwain
07/23/2024, 8:32 AMOwain
07/23/2024, 8:55 AMOwain
07/23/2024, 8:56 AMCraig100
07/23/2024, 1:54 PMOwain
07/23/2024, 1:56 PMOwain
07/23/2024, 1:56 PMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by