Do context theme support tree shaking ?
krishnasaga opened this issue · comments
Krishna Sagar R commented
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 ?