We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4293162 commit 1a7177eCopy full SHA for 1a7177e
lib/join.js
@@ -68,6 +68,8 @@
68
function parse(prefix, dir, url) {
69
var names,
70
joinPath = prefix + prefix + '.js',
71
+ joinOpt = joinPath.replace('/', '/?'),
72
+ joinRegExp = RegExp(joinOpt),
73
isStr = typeof url === 'string';
74
75
if (!isStr)
@@ -76,7 +78,7 @@
76
78
names = url.replace(prefix + ':', '')
77
79
.split(':')
80
.map(function(name) {
- if (name === joinPath) {
81
+ if (joinRegExp.test(name)) {
82
name = FILE;
83
} else {
84
name = path.join(dir, name);
0 commit comments