Skip to content

Importing CSS files #11

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

Closed
pburtchaell opened this issue Jun 10, 2015 · 3 comments
Closed

Importing CSS files #11

pburtchaell opened this issue Jun 10, 2015 · 3 comments

Comments

@pburtchaell
Copy link

As of right now, my setup is that I have one CSS file in app/styles/app.css, which imports a number of modules. For example:

@import 'utils/variables.css';
@import 'modules/typography/headings.css';
@import 'modules/buttons/base.css';
@import 'modules/forms/base.css';
@import 'modules/layout/grid.css';
@import 'modules/layout/reset.css';

This CSS file is required in app/app.js.

import './styles/app';`

When I make a change to one of the module files, WebPack does not run. It will only run if I change app/styles/app.css—which makes sense, but is a bit inconvenient. I'm using the postcss-loader plugin to handle my @import declarations, so WebPack wouldn't know to "watch" the CSS files that are imported.

Is there a way to work around this issue though? Maybe by specifying a glob of files to watch in the PostCSS config?

@ai
Copy link
Contributor

ai commented Jun 10, 2015

Double for #8

@ai ai closed this as completed Jun 10, 2015
@ai
Copy link
Contributor

ai commented Jun 10, 2015

Current answer: use a webpack dependency :)

@pburtchaell
Copy link
Author

Ah, didn't realize that was the same issue at a first glance. I'll jump in on the conversation there.

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