SASS/SCSS into the main CSS bundle file

Hi @radekmie I red your article (On CSS Modules in Meteor · @radekmie’s take on IT and stuff) and it helped me to get a (better) understanding of how CSS files are being generated.

I wanted to ask you, do you have a suggestion on how to push all resulting styling to the main bundle CSS file (<link rel="stylesheet" type="text/css" class="__meteor-css__" href="xxx">) as oppose to creating multiple style tags.

Postcss and sass processor are using this: https://github.com/meteor/meteor/blob/7411b3c85a3c95a6b6f3c588babe6eae894d6fb6/packages/modules/css.js#L4 but would definitely prefer to push everything to the bundle file at build time and pipe that through a CDN.

tx

I think it would be possible by generating a CSS asset (see addStylesheet) so standard-minifer-css could pick and bundle it up. I didn’t test it, though.

It seems that addStylesheet is already part of the flow in both Less and SCSS packages however the boilerplate generates a tag instead of merging CSS with the minifier. Will need to dig deeper and overwrite some Meteor code to get some debug logs. Tx

It does only for lazy assets IIRC; eager ones should be fine.