From 0c34e688439713725d4215c63bc4cf876d8d0423 Mon Sep 17 00:00:00 2001 From: Martin Naumann Date: Mon, 12 Oct 2015 16:02:25 +0200 Subject: [PATCH] Build: Fixed issue with base path that contain 'var' Remove the cwd from the paths, so the regex doesn't kick in on "var" Fixes gh-2450 Closes gh-2641 --- 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 750bac5b7..74fa47fde 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -53,7 +53,7 @@ module.exports = function( grunt ) { var amdName; // Convert var modules - if ( /.\/var\//.test( path ) ) { + if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) { contents = contents .replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" ) .replace( rdefineEnd, "" ); -- 2.39.5