ember-cli / broccoli-asset-rewrite

Broccoli plugin to rewrite a source tree from an asset map.
MIT License
10 stars 53 forks source link

Prepending of relative and absolute path to same asset fails #72

Open wouterbin opened 5 years ago

wouterbin commented 5 years ago

When having multiple paths to same asset, but mixed with absolute and relative paths, prepending fails:

let relativePath = "assets/images/some-image.svg";
let absolutePath = "/assets/images/some-image.svg";

generates this:

let relativePath = "https://cloudfront.net/assets/images/some-image-fingerprinted.svg";
let absolutePath = "/https://cloudfront.net/assets/images/some-image-fingerprinted.svg";

I created PR #71 with a failing spec. I couldn't find and fix the code myself....