Skip to content

Commit

Permalink
Correct regex on CJS parser to detect a core module
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Gomez committed Nov 24, 2015
1 parent 39e5c4e commit 67a449a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ util.inherits(CJS, Base);
*/
CJS.prototype.normalize = function (filename) {
filename = this.replaceBackslashInPath(filename);
if (filename.charAt(0) !== '/' && !filename.match(/^[a-z]:\//i)) {
if (filename.charAt(0) !== '/' && !filename.match(/^[a-z]+\//i)) {
// a core module (not mapped to a file)
return filename;
}
Expand Down

0 comments on commit 67a449a

Please sign in to comment.