Skip to content

Commit

Permalink
fix require bug
Browse files Browse the repository at this point in the history
fix  require(  'node'  )  not matched !  issue hustxiaoc/gulp-kmc#4
  • Loading branch information
淘小杰 committed Jan 16, 2015
1 parent a3b97b4 commit 6ef861b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

var uriReg = /http(s)?:\/\/([^/]+)(?::(\d+))?/;
var commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
var requireRegExp = /[^.'"]\s*require\s*\((['"])([^)]+)\1\)/g;
var requireRegExp = /[^.'"]\s*require\s*\(\s*(['"])([^)]+)\1\s*\)/g;

function normalizeId(id) {
if (id.charAt(0) === '/') {
Expand Down Expand Up @@ -428,4 +428,4 @@
}, config));
}
});
})(modulex);
})(modulex);

0 comments on commit 6ef861b

Please sign in to comment.