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

Version path segment is not added to compiled CSS URLs #291

Open
kpfefferle opened this issue Dec 13, 2018 · 2 comments
Open

Version path segment is not added to compiled CSS URLs #291

kpfefferle opened this issue Dec 13, 2018 · 2 comments

Comments

@kpfefferle
Copy link

It appears as though compiled CSS is not including the version path segment in ember-cli-addon-docs deployments that use versioned docs. See Addepar/ember-table#593 for an example.

The ember-table demo there is referring to an SVG in CSS that is failing to load with a 404. This is because the file is deployed to the version directory at /ember-table/latest/@addepar/style-toolbox/assets/images/checkmark.svg while the CSS is pointing to /ember-table/@addepar/style-toolbox/assets/images/checkmark.svg. The compiled CSS is missing the /latest/ segment of the URL path.

@bantic
Copy link
Contributor

bantic commented Jul 17, 2019

I took a look at this recently, and it appears that the fault lies in the style rule that we were using, which uses an absolute URL, resulting in this CSS:

background-image: url('/@addepar/style-toolbox/assets/images/checkmark.svg');

I think the docs for addon-docs could be improved by clarifying how asset compilation works when deploying, but it looks to me like the specific issue at hand here is that the underlying CSS rule is hardcoding an absolute path to the asset.

@kpfefferle
Copy link
Author

kpfefferle commented Jul 17, 2019

@bantic Isn't it the job of the build process to find these URLs and update them? The build process is already adding the /ember-table segment to the above asset path (as noted in my prior comment), so wouldn't you think it should also be responsible for adding the /latest (or other version) segment to the URL path?

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

No branches or pull requests

2 participants