Skip to content

Commit 0c34e68

Browse files
Martin Naumannmarkelog
authored andcommitted
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
1 parent 03eaadb commit 0c34e68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/tasks/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = function( grunt ) {
5353
var amdName;
5454

5555
// Convert var modules
56-
if ( /.\/var\//.test( path ) ) {
56+
if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) {
5757
contents = contents
5858
.replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" )
5959
.replace( rdefineEnd, "" );

0 commit comments

Comments
 (0)