javivelasco / javivelasco/react-css-themr
Do context theme support tree shaking ?
- Dominant language
- JavaScript
- Stars
- 589
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
For example is have code like this
```
//component.js
import { Button, Radio } from 'my-library';
const Component = props =>
;```
```
//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'),
};
```
I'm using extract-text-plugin for webpack.
Will my final build contains CSS of other ass well ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the ThemeProvider and context-theme entry points, then inspect the webpack configuration using extract-text-plugin. Compare the generated CSS for Button and Radio with the unused Other theme; done means documenting whether tree shaking removes Other and what configuration or usage determines that.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, react, webpack
- Domain
- build-system, frontend
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100