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

How to bundle and distribute included third-party CSS with react component? #2

Open
srinathh opened this issue Mar 16, 2017 · 0 comments

Comments

@srinathh
Copy link

srinathh commented Mar 16, 2017

I have used CSS modules to import styles from a third-party CSS (material components for web) and have applied it on my React components including the @CSSModules(styles) decorator.

import styles from '@material/card/dist/mdc.card.css'
import CSSModules from 'react-css-modules';

When I try to build it, the built code still seems to refer to the third-party css component rather than a bundled css which causes Module not found: 'postcss' error when trying to import it in an app.

var _materialCardDistMdcCardCss = require('@material/card/dist/mdc.card.css');

Is there a way to bundle all the required css with the component?

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

1 participant