# HTML5 export, Utility.js append bug

**URL:** <https://forums.unrealengine.com/t/html5-export-utility-js-append-bug/337355>\
**Category:** Platform & Builds\
**Tags:** source-code, HTML5, unreal-engine, bug-report, packaging-projects, CPP, question\
**Created:** [November 3, 2015, 7:46pm UTC](https://forums.unrealengine.com/t/html5-export-utility-js-append-bug/337355 "2015-11-03T19:46:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1d9c3aac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1d9c3aac](https://forums.unrealengine.com/u/anonymous_user_1d9c3aac)\
**Post date:** [November 3, 2015, 7:46pm UTC](https://forums.unrealengine.com/t/html5-export-utility-js-append-bug/337355/1 "2015-11-03T19:46:00Z")

</div>

Currently, when the project is packaged for HTML, a Utility.js file gets created and is being populated with the content of a few js files coming with the source.

With each packaging, this file gets bigger and bigger as it is **appended** by AutomationTool.

[Click to see the code in Unreal Engine Github repository][1]

```
		string DestinationFile = OutDir + "/Utility.js";
		foreach( var UtilityFile in UtilityJavaScriptFiles)
		{
			string Data = File.ReadAllText(UtilityFile);
			File.AppendAllText(DestinationFile, Data);
		}

```

Content of the file must be cleaned (if exists) before appending.

[https://github.com/EpicGames/UnrealEngine/blob/a27ad66f0a075f3b74ef8f68a4b2b0da4882425e/Engine/Source/Programs/AutomationTool/HTML5/HTML5Platform.Automation.cs#L157](https://github.com/EpicGames/UnrealEngine/blob/a27ad66f0a075f3b74ef8f68a4b2b0da4882425e/Engine/Source/Programs/AutomationTool/HTML5/HTML5Platform.Automation.cs#L157)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [November 6, 2015, 4:51pm UTC](https://forums.unrealengine.com/t/html5-export-utility-js-append-bug/337355/2 "2015-11-06T16:51:28Z")

</div>

Hey ,

Thanks for reporting this. I have verified that this is an issue within the engine and have submitted a report. If you’d like to check on this bug in the future, please reference: UE-23064.

Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1d9c3aac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1d9c3aac](https://forums.unrealengine.com/u/anonymous_user_1d9c3aac)\
**Post date:** [November 6, 2015, 5:08pm UTC](https://forums.unrealengine.com/t/html5-export-utility-js-append-bug/337355/3 "2015-11-06T17:08:25Z")

</div>

nice to hear that 🙂 thanks
