|
|
|
|
|
by madeofpalk
3212 days ago
|
|
No reason why Webpack/`import css` couldn't eliminate the CSS from this // styles.css
.root { background: grey; }
.button { border: 1px solid blue; }
.error { color: red }
.alert { background: red }
// Component.css
import styles from './styles.css'
return (
<div className={styles.root}>
<button className={styles.button}>Submit</button>
{false && <div className={styles.error}>Error!</div>}
</div>
)
Both the .error and .alert are candidates for being removed.Of course, I'm not aware of any solution for nothing this currently, but all the bits and pieces are there for it to be feasible. |
|