3 ms·
There's still no good way of publishing an npm package with multiple components, stylesheets per component, and transitive consumers using only the stylesheets
by aphexairlines 4y ago
There's still no good way of publishing an npm package with multiple components, stylesheets per component, and transitive consumers using only the stylesheets for the components they reference while rendering fully server side. CSS is still not scalable.
- spankalee 4y agoThis is what native CSS module scripts solve. You can import CSS directly into JavaScript modules: import styles from './styles.css' assert {type: 'css'}; https://web.dev/css-module-scripts/ https://web.dev/css-module-scripts/ Live example: https://lit.dev/playground/#gist=f0bdd3b5db5e4a404297e695305f92d9 https://lit.dev/playground/#gist=f0bdd3b5db5e4a404297e695305...
- jacobr 4y agoSSR was mentioned though.