ember-cli / broccoli-asset-rewrite

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

v1.0.12 breaks asset paths in addon CSS #36

Closed mjuniper closed 8 years ago

mjuniper commented 8 years ago

I verified that everything works if I force it to 1.0.11.

But at 1.0.12, I get the following issue:

We have an ember-cli app that uses ember-cli-bootstrap-colorpicker. When we do a production build, the vendor css contains URLs that look like this:

//my-assets-url/assets/../img/bootstrap-colorpicker/saturation-668d0a0e7a0189f62898bcc57ab8370c.png

Note the /../ in the middle of the url - that causes it to resolve to the wrong url and 404. Again, when I forced broccoli-asset-rev to use v1.0.11 of broccoli-asset-rewrite, we no longer see this issue and we get proper urls in the css like:

//my-assets-url/assets/img/bootstrap-colorpicker/saturation-668d0a0e7a0189f62898bcc57ab8370c.png

rickharrison commented 8 years ago

Could you write a failing test case for this?

mjuniper commented 8 years ago

Ugh, I can try but I'm not sure how. I'll take a stab.

rickharrison commented 8 years ago

Pinging @john-kurkowski

mjuniper commented 8 years ago

OK, that wasn't so hard. I think I got it right.

john-kurkowski commented 8 years ago

Thanks! Taking a look...