Skip to content

Do context theme support tree shaking ? #77

@krishnasaga

Description

@krishnasaga

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions