🖍 ✨ bento npm components: distribute css file#35446
🖍 ✨ bento npm components: distribute css file#35446samouri merged 12 commits intoampproject:mainfrom
Conversation
|
Hey @erwinmombay, @jridgewell! These files were changed: Hey @rsimha! These files were changed: |
Two components have multiple JSS files:
I'd recommend we concat into a single file for the sake of simplicity and given neither of the additional style files are particularly large even if we do end up publishing the videos. As a naming nit, WDYT about |
Thanks for the info. I've implemented concatting the JSS files, as well as renamed the file to |
rsimha
left a comment
There was a problem hiding this comment.
Super, thanks for the fixes!
summary
Addresses: #35413 (comment)
Distributes CSS files for bento components with the name
extension.css. For example, theamp-fit-textbento component will distributeamp-fit-text.css.This change works via a new function
buildNpmCsswhich calls babel with the jss plugin on the specific.jss.jsfile needed. It uses the option object{css: 'REPLACED_BY_BABEL'}which is then replaced by babel during its transform. Results are stored in a newTransformCache.questions
css-cacheTransformCache or make a new one? They should never have hash collisions.amp buildor justamp dist?