Skip to content

fix(@angular/cli): fix css url processing #4803

Merged
filipesilva merged 2 commits into
angular:masterfrom
filipesilva:css-urls
Feb 20, 2017
Merged

fix(@angular/cli): fix css url processing #4803
filipesilva merged 2 commits into
angular:masterfrom
filipesilva:css-urls

Conversation

@filipesilva

@filipesilva filipesilva commented Feb 17, 2017

Copy link
Copy Markdown
Contributor

Fixing component css in #4667 uncovered errors in CSS url processing.

This PR correctly composes absolute urls when using --base-href and/or --deploy-url.

It also fixes asset output on --aot mode. Thanks to @clydin for finding out assets were being dropped in the child compiler.

Fix #4778
Fix #4782
Fix #4806

@Brocco Brocco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, LGTM!

@filipesilva filipesilva force-pushed the css-urls branch 2 times, most recently from 856d36d to 3fadf6a Compare February 18, 2017 11:00
@filipesilva filipesilva reopened this Feb 18, 2017
@filipesilva

Copy link
Copy Markdown
Contributor Author

Still having some problems with the eject config, I need to ask @hansl for advice on it next week.

Fixing component css in angular#4667 uncovered errors in CSS url processing.

This PR correctly composes absolute urls when using `--base-href` and/or `--deploy-url`.

It also fixes asset output on `--aot` mode.

Fix angular#4778
Fix angular#4782
Fix angular#4806
@filipesilva filipesilva changed the title fix(@angular/cli): correctly compose absolute urls fix(@angular/cli): fix css url processing Feb 20, 2017
@omargon

omargon commented Feb 24, 2017

Copy link
Copy Markdown

@filipesilva thanks for the fix. Do you know when it will be release and/or if there is a workaround in the meantime?

@filipesilva

Copy link
Copy Markdown
Contributor Author

@omargon workaround would be to use absolute image paths. This will come out next release, which should be early next week I think.

@omargon

omargon commented Feb 24, 2017

Copy link
Copy Markdown

@filipesilva thanks.

@ghost

ghost commented Mar 5, 2017

Copy link
Copy Markdown

I'm serving assets on a subdomain, and I need to set the deployUrl=http://sub.domain.com/, this worked on version beta26, but now with rc1 this is broken, and I think it is because of this fix you have done here.
In the generated code I see everywhere my deployUrl written like this: /http:/sub.domain.com/assets/...
It reads it as an absolute path relative to the url on which the files were served.

@clydin

clydin commented Mar 5, 2017

Copy link
Copy Markdown
Member

@ES-Lab please open an issue so that we can properly assist you.

@ghost

ghost commented Mar 6, 2017

Copy link
Copy Markdown

@clydin I've opened the issue here #5254

asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
Fixing component css in angular#4667 uncovered errors in CSS url processing.

This PR correctly composes absolute urls when using `--base-href` and/or `--deploy-url`.

It also fixes asset output on `--aot` mode.

Fix angular#4778
Fix angular#4782
Fix angular#4806
@HelloPb

HelloPb commented Feb 23, 2018

Copy link
Copy Markdown

background: url('assets/client/img.png') is throwing compilation error for ng build -prod

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

6 participants