diff --git a/tasks/pretest.js b/tasks/pretest.js index 83be5a8fcb6..69843c698c1 100644 --- a/tasks/pretest.js +++ b/tasks/pretest.js @@ -55,9 +55,13 @@ function makeTestImageFolders() { // Make script file that define plotly in a RequireJS context function makeRequireJSFixture() { - var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8'), - template = 'define(\'plotly\', function(require, exports, module) { {{bundle}} });', - index = template.replace('{{bundle}}', bundle); + var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8'); + + var index = [ + 'define(\'plotly\', function(require, exports, module) {', + bundle, + '});' + ].join(''); common.writeFile(constants.pathToRequireJSFixture, index); logger('make build/requirejs_fixture.js');