From 0652c4d6a203a1c56ab08f62d6649ba31b7ddfab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski?= Date: Mon, 25 Apr 2016 22:34:29 +0200 Subject: [PATCH] Build: Strip excessive "use strict" pragmas when building Fixes gh-3077 --- build/tasks/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/build.js b/build/tasks/build.js index 0eff368f7..926348182 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -81,7 +81,7 @@ module.exports = function( grunt ) { // Remove define wrappers, closure ends, and empty declarations contents = contents - .replace( /define\([^{]*?{/, "" ) + .replace( /define\([^{]*?{\s*(?:("|')use strict\1(?:;|))?/, "" ) .replace( rdefineEnd, "" ); // Remove anything wrapped with -- 2.39.5