I would gladly answer this, but I don’t understand the question…
I use this code to add my custom JS file to the build:
if (Target.Platform == UnrealTargetPlatform.HTML5)
{
string dir = Path.GetDirectoryName(Target.ProjectFile.ToString());
Console.WriteLine("Build.cs::HTML5: " + dir + "\n");
PublicAdditionalLibraries.Add(dir + "/Source/MyProject/JSEvents.js");
}