diff --git a/lib/server.js b/lib/server.js index ee6a3f0..50aa754 100644 --- a/lib/server.js +++ b/lib/server.js @@ -136,7 +136,9 @@ exports.create = function create(createOptions) { } else { var htmlTag = createOptions.scriptLocation === 'head' ? '' : ''; - html = html.replace(htmlTag, script + htmlTag); + var splitHtml = html.split(htmlTag); + splitHtml[0] += script; + html = splitHtml.join(htmlTag); } }