Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.12 breaks asset paths in addon CSS #36

Closed
mjuniper opened this issue Jun 28, 2016 · 5 comments · Fixed by #38
Closed

v1.0.12 breaks asset paths in addon CSS #36

mjuniper opened this issue Jun 28, 2016 · 5 comments · Fixed by #38

Comments

@mjuniper
Copy link
Contributor

mjuniper commented Jun 28, 2016

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
Copy link
Collaborator

Could you write a failing test case for this?

@mjuniper
Copy link
Contributor Author

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

@rickharrison
Copy link
Collaborator

Pinging @john-kurkowski

@mjuniper
Copy link
Contributor Author

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

@john-kurkowski
Copy link
Contributor

Thanks! Taking a look...

john-kurkowski added a commit to john-kurkowski/broccoli-asset-rewrite that referenced this issue Jun 29, 2016
Releative segments are normally prevented by the `relative` function elsewhere in the file, when creating the asset map, but can return when persisting fragments.

Fixes ember-cli#36.
john-kurkowski added a commit to john-kurkowski/broccoli-asset-rewrite that referenced this issue Jun 29, 2016
Consistent with prepending behavior prior to ember-cli#35. Which even removes all depths of relative segments, regardless if it resolves to a valid asset. Perhaps that was never intentional, but nobody's complained.

Fixes ember-cli#36.
john-kurkowski added a commit to john-kurkowski/broccoli-asset-rewrite that referenced this issue Jun 29, 2016
Consistent with prepending behavior prior to ember-cli#35. Which even removes all depths of relative segments, regardless if it resolves to a valid asset. Perhaps that was never intentional, but nobody's complained.

Fixes ember-cli#36.
john-kurkowski added a commit to john-kurkowski/broccoli-asset-rewrite that referenced this issue Jun 29, 2016
Consistent with prepending behavior prior to ember-cli#35. Which even removes all depths of relative segments, regardless if it resolves to a valid asset. Perhaps that was never intentional, but nobody's complained.

Fixes ember-cli#36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants