From fc9d4f2ee4f65e30e9453339c7cf876e0264a582 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Fri, 12 Aug 2016 01:00:20 -0400 Subject: [PATCH] fix "use strict" detection in bundler --- bundler/bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/bundle.js b/bundler/bundle.js index e8f37cd0..f9a03181 100644 --- a/bundler/bundle.js +++ b/bundler/bundle.js @@ -60,7 +60,7 @@ module.exports = function(input, output, options) { function exportCode(file, def, variable, eq) { var declared = {} return fixCollisions(fs.readFileSync(file, "utf8")) - .replace(/("|')use strict\1;?\s*/gm, "") // remove extraneous "use strict" + .replace(/("|')use strict\1;?/gm, "") // remove extraneous "use strict" .replace(/module\.exports\s*=\s*/gm, def + variable + eq) .replace(/module\.exports(\.|\[)/gm, function(match, token, length, code) { if (new RegExp("\\b" + variable + "\\b").test(variable) && !declared[variable]) {