Skip to content

Commit

Permalink
append version to the root js file. maybe fix #677
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Oct 16, 2024
1 parent 0560918 commit 39d3a98
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions uSync.Backoffice.Management.Client/uSyncManifestReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,28 @@ internal sealed class uSyncManifestReader : IPackageManifestReader
{
public Task<IEnumerable<PackageManifest>> ReadPackageManifestsAsync()
{
var entrypoint = JsonObject.Parse(@"{""name"": ""usync.entrypoint"",
""alias"": ""uSync.EntryPoint"",
""type"": ""entryPoint"",
""js"": ""/App_Plugins/uSync/usync.js""}");
var version = GetuSyncVersion();
var script = $"/App_Plugins/uSync/usync.js?v={version}";

List<PackageManifest> manifest = [
new PackageManifest
{
Id = "uSync",
Name = "uSync",
AllowTelemetry = true,
Version = GetuSyncVersion(),
Extensions = [ entrypoint!],
Version = version,
Extensions = [ new JsonObject {
["name"] = "usync.entrypoint",
["alias"] = "uSync.EntryPoint",
["type"] = "entryPoint",
["js"] = script,
}],
Importmap = new PackageManifestImportmap
{
Imports = new Dictionary<string, string>
{
{ "@jumoo/uSync", "/App_Plugins/uSync/usync.js" },
{ "@jumoo/uSync/external/signalr", "/App_Plugins/uSync/usync.js" }
{ "@jumoo/uSync", script },
{ "@jumoo/uSync/external/signalr", script }
}
}
}
Expand Down

0 comments on commit 39d3a98

Please sign in to comment.