app-bundler 0.2.21 → 0.2.22
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.
- package/lib/bundler.js +9 -0
- package/lib/cli.js +9 -0
- package/package.json +1 -1
package/lib/bundler.js
CHANGED
|
@@ -1310,12 +1310,21 @@ const global_1 = _src_global;
|
|
|
1310
1310
|
var Npm;
|
|
1311
1311
|
(function (Npm) {
|
|
1312
1312
|
function resolveAppUrl(path, currentLocation, opts) {
|
|
1313
|
+
var _a;
|
|
1313
1314
|
let base = opts.base;
|
|
1314
1315
|
let name = /^(@?[^\\\/]+)/.exec(path)[0];
|
|
1316
|
+
let subname = (_a = /^([^\\\/]+)\/([^\\\/]+)/.exec(path)) === null || _a === void 0 ? void 0 : _a[2];
|
|
1315
1317
|
let resource = path.substring(name.length + 1);
|
|
1316
1318
|
while (path != null) {
|
|
1317
1319
|
let dirname = (0, path_1.path_combine)(currentLocation, 'node_modules', name, '/');
|
|
1318
1320
|
let pkg = (0, path_1.path_combine)(dirname, 'package.json');
|
|
1321
|
+
if (subname) {
|
|
1322
|
+
// Resolve also "@foo/bar/qux" as "node_modules/@foo/bar/qux.js"
|
|
1323
|
+
let pkg2 = (0, path_1.path_combine)(dirname, subname, 'package.json');
|
|
1324
|
+
if (global_1.io.File.exists(pkg2)) {
|
|
1325
|
+
pkg = pkg2;
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1319
1328
|
if (global_1.io.File.exists(pkg) === false) {
|
|
1320
1329
|
let next = currentLocation.replace(/[^\/]+\/?$/, '');
|
|
1321
1330
|
if (next === currentLocation) {
|
package/lib/cli.js
CHANGED
|
@@ -1312,12 +1312,21 @@ const global_1 = _src_global;
|
|
|
1312
1312
|
var Npm;
|
|
1313
1313
|
(function (Npm) {
|
|
1314
1314
|
function resolveAppUrl(path, currentLocation, opts) {
|
|
1315
|
+
var _a;
|
|
1315
1316
|
let base = opts.base;
|
|
1316
1317
|
let name = /^(@?[^\\\/]+)/.exec(path)[0];
|
|
1318
|
+
let subname = (_a = /^([^\\\/]+)\/([^\\\/]+)/.exec(path)) === null || _a === void 0 ? void 0 : _a[2];
|
|
1317
1319
|
let resource = path.substring(name.length + 1);
|
|
1318
1320
|
while (path != null) {
|
|
1319
1321
|
let dirname = (0, path_1.path_combine)(currentLocation, 'node_modules', name, '/');
|
|
1320
1322
|
let pkg = (0, path_1.path_combine)(dirname, 'package.json');
|
|
1323
|
+
if (subname) {
|
|
1324
|
+
// Resolve also "@foo/bar/qux" as "node_modules/@foo/bar/qux.js"
|
|
1325
|
+
let pkg2 = (0, path_1.path_combine)(dirname, subname, 'package.json');
|
|
1326
|
+
if (global_1.io.File.exists(pkg2)) {
|
|
1327
|
+
pkg = pkg2;
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1321
1330
|
if (global_1.io.File.exists(pkg) === false) {
|
|
1322
1331
|
let next = currentLocation.replace(/[^\/]+\/?$/, '');
|
|
1323
1332
|
if (next === currentLocation) {
|