@open-norantec/herbal 1.0.2-alpha.10 → 1.0.2-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -132,10 +132,18 @@ var ClientUtil = (function () {
|
|
|
132
132
|
setup: function (build) {
|
|
133
133
|
build.onResolve({ filter: /.*/ }, function (args) {
|
|
134
134
|
var fullPath = path.resolve(path.dirname(args.importer), args.path);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
var attemptPaths = [];
|
|
136
|
+
if (!fullPath.endsWith('.js')) {
|
|
137
|
+
attemptPaths.push("".concat(fullPath, ".js"));
|
|
138
|
+
attemptPaths.push(path.resolve(fullPath, 'index.js'));
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
attemptPaths.push(fullPath);
|
|
142
|
+
}
|
|
143
|
+
for (var _i = 0, attemptPaths_1 = attemptPaths; _i < attemptPaths_1.length; _i++) {
|
|
144
|
+
var attemptPath = attemptPaths_1[_i];
|
|
145
|
+
if (outputMap.has(attemptPath))
|
|
146
|
+
return { path: attemptPath, namespace: 'vfs' };
|
|
139
147
|
}
|
|
140
148
|
return { path: args.path, external: true };
|
|
141
149
|
});
|