app-bundler 0.0.99 → 0.1.0

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 CHANGED
@@ -530,8 +530,12 @@ function path_isRelative(path) {
530
530
  exports.path_isRelative = path_isRelative;
531
531
  ;
532
532
  function path_toRelative(path, anchor, base) {
533
- var path_ = path_resolveUrl(path_normalize(path), base), absolute_ = path_resolveUrl(path_normalize(anchor), base);
534
- if (path_getExtension(absolute_) !== '') {
533
+ var pathNormalized = path_normalize(path);
534
+ var anchorNormalized = path_normalize(anchor);
535
+ var path_ = path_resolveUrl(pathNormalized, base);
536
+ var absolute_ = path_resolveUrl(anchorNormalized, base);
537
+ if (pathNormalized.includes(anchorNormalized) === false && path_getExtension(absolute_) !== '') {
538
+ // in-case anchor is a File
535
539
  absolute_ = path_getDir(absolute_);
536
540
  }
537
541
  absolute_ = path_combine(absolute_, '/');
package/lib/cli.js CHANGED
@@ -532,8 +532,12 @@ function path_isRelative(path) {
532
532
  exports.path_isRelative = path_isRelative;
533
533
  ;
534
534
  function path_toRelative(path, anchor, base) {
535
- var path_ = path_resolveUrl(path_normalize(path), base), absolute_ = path_resolveUrl(path_normalize(anchor), base);
536
- if (path_getExtension(absolute_) !== '') {
535
+ var pathNormalized = path_normalize(path);
536
+ var anchorNormalized = path_normalize(anchor);
537
+ var path_ = path_resolveUrl(pathNormalized, base);
538
+ var absolute_ = path_resolveUrl(anchorNormalized, base);
539
+ if (pathNormalized.includes(anchorNormalized) === false && path_getExtension(absolute_) !== '') {
540
+ // in-case anchor is a File
537
541
  absolute_ = path_getDir(absolute_);
538
542
  }
539
543
  absolute_ = path_combine(absolute_, '/');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-bundler",
3
- "version": "0.0.99",
3
+ "version": "0.1.0",
4
4
  "description": "",
5
5
  "main": "lib/bundler.js",
6
6
  "bin": {