dymaptic / GeoBlazor

Core Components for the Dymaptic GeoBlazor Library
MIT License
109 stars 19 forks source link

Version JavaScript files to avoid caching issues #268

Closed TimPurdum closed 11 months ago

TimPurdum commented 12 months ago

We should add a versioned query param to the loading of the JavaScript modules to avoid issues with browsers caching an older version when an application is updated.

e.g. in JsModuleManager

return await jsRuntime
                    .InvokeAsync<IJSObjectReference>("import", cancellationToken, 
                        "./_content/dymaptic.GeoBlazor.Core/js/arcGisJsInterop.js?v=2.5.0");

The tricky part would be to set that version in code based on the Directory.Build.props environment variable CoreVersion.