I am working with express and handlebars
I have encountered this problem several times now and I cannot find any mention of it anywhere.
I always encounter this problem with code inside a script tag, but I believe it can happen in any tag; when I use big data sets in an {{#each}} loop the user is served an incomplete html page where the code in the script tag ends mid line with a "..." and everything after it, including hard coded lines, are lost. Interestingly, the </script>
tag, and all the html after it are rendered correctly, it is just the code inside that script tag that is lost. See screenshot below for an example.

The threshold for the size of the data set that makes this error occur seems very low. I did some tests on the example above, and found that it only works correctly when the list has 1 element, as soon as there are 2 or more elements in the list, the error occurs. (the list I'm using just has big strings for every element like the ones seen above)
The handlebars each loop I'm using is very simple, just-
{{#each stringList}}
appRowMap["row{{@index}}"] = "{{this}}".toLowerCase();
{{/each}}
Does anyone know why this happens and how to get around this problem?