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

Add warning about importing CSS in Angular CLI projects #3022

Merged
merged 4 commits into from
Feb 19, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/src/pages/configurations/default-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ import './styles.css';

> **Note:** this is plain CSS only. If you need a preprocessor like SASS, you need to [customize the webpack config](/configurations/custom-webpack-config/).

> **Warning:** storybooks for projects that use Angular CLI must use the inline loader syntax:
> ```js
> import '!style-loader!css-loader!./styles.css';
Copy link
Member

Choose a reason for hiding this comment

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

I would say that this is also available by adding an extra rule to the extended webpack config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean like you talked about here? Is this really something we want to explicitly recommend? It relies on manipulating rules that are part of the private Angular CLI implementation, and could break if Angular changes something.

Copy link
Member

Choose a reason for hiding this comment

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

I think bringing here a concrete example is not needed. Just to mention about a feature storybook has (extended webpack config). I think that people just need to know about all the possibilities they have.

> ```

### Image and Static File Support

You can also import images and media files directly via JavaScript.
Expand Down