3 ms·
I feel stupid asking this question, but isn't the browser that parses css? i understand minifying css, but what does parcel's css parsing refer to?
by swagatkonchada 5y ago
I feel stupid asking this question, but isn't the browser that parses css? i understand minifying css, but what does parcel's css parsing refer to?
- mbb70 5y agoIt parses the css so it can improve the minification, for example converting 'margin: 4px 4px 4px 4px' into 'margin:4px'
- yosamino 5y agoTo do the job of minifying, this minifyer first reads the CSS file into an internal datastructure. That process is called parsing. All the minifying operations are done on that internal datastructure. Then it writes it out again into a textfile, ready for the browser to parse it again - hopefully the minifying step made it a bit easier for the browser to parse this minified CSS.
- mekster 5y agoFor packages that have images and css, it reads css and extracts image files to be bundled.