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

fix(webpack): correctly load component stylesheets #3511

Merged
merged 1 commit into from Dec 16, 2016
Merged

fix(webpack): correctly load component stylesheets #3511

merged 1 commit into from Dec 16, 2016

Conversation

clydin
Copy link
Member

@clydin clydin commented Dec 11, 2016

Component styles were being generated as javascript due to the chaining of css-loader and raw-loader. This is changed to only use the css-loader for global stylesheets (the behavior before PR #3402).

If there is a desire/need to maintain the use of css-loader in all cases, the raw-loader could be swapped with something along the lines of exports-loader?module.exports.toString().

@dave-kennedy
Copy link

dave-kennedy commented Dec 12, 2016

Fixes 3534?

@clydin
Copy link
Member Author

clydin commented Dec 12, 2016

@dave-kennedy, unrelated.
This addresses an issue in master.

@clydin
Copy link
Member Author

clydin commented Dec 14, 2016

/cc @filipesilva

@hansl
Copy link
Contributor

hansl commented Dec 16, 2016

@clydin thanks for the PR. Yours seems better than mine. Could you add the same test that I added to my PR? That way we can avoid regressing over this big in the future. Thanks

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@clydin
Copy link
Member Author

clydin commented Dec 16, 2016

Added your test.

@hansl
Copy link
Contributor

hansl commented Dec 16, 2016

Okay you'll need to sign the CLA and everything is good.

@filipesilva filipesilva self-assigned this Dec 16, 2016
Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

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

@clydin thank you for fixing this. Reading through your fix I see that I mistakenly added css-loader to component css, whereas it needs to only have raw-loader instead.

This supersedes #3588 as the correct solution.

@filipesilva
Copy link
Contributor

@clydin can you squash the commits into a single one authored by you? That's what's messing up the CLA.

@googlebot
Copy link

CLAs look good, thanks!

@clydin
Copy link
Member Author

clydin commented Dec 16, 2016

@filipesilva, that's annoying.

Ok. Squashed.

@filipesilva
Copy link
Contributor

@clydin thank you, waiting on CI for merge.

@hansl
Copy link
Contributor

hansl commented Dec 16, 2016

LGTM. Thanks!

@hansl hansl merged commit d4da7bd into angular:master Dec 16, 2016
@clydin clydin deleted the component-styles branch December 17, 2016 18:50
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
@angular-automatic-lock-bot
Copy link

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 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants