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

Do context theme support tree shaking ? #77

Open
krishnasaga opened this issue Oct 12, 2017 · 0 comments
Open

Do context theme support tree shaking ? #77

krishnasaga opened this issue Oct 12, 2017 · 0 comments

Comments

@krishnasaga
Copy link

krishnasaga commented Oct 12, 2017

For example is have code like this

//component.js
import { Button, Radio } from 'my-library';

const Component = props => <div><Button></Button><Radio></div>;

//Theme.js
const contextTheme = {
  Button: require('my-library/button/theme1.css'),
  Radio: require('my-library/radio/theme1.css'),
  Other: require('my-library/other/theme1.css'),
};

<ThemeProvider them={contextTheme} >
     <Component></Component>
</ThemeProvider>

I'm using extract-text-plugin for webpack.
Will my final build contains CSS of other ass well ?

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