Re: [w3c/webcomponents] CSS Modules (#759)

Just got directed towards this proposal. Overall I like it; it fills an important gap in the platform, and anything that allows us to avoid storing things that aren't JavaScript inside JavaScript files is a good thing.

I am concerned about the one-stylesheet-per-file thing though. With JavaScript modules, we can optimise apps by concatenating them into coarse-grained code-split chunks, which generally results in better performance than serving many small modules. It stands to reason that the performance considerations are similar for CSS modules, but as far as I can tell it's not possible to 'concatenate' multiple .css files under this proposal. I've [drawn up a gist](https://gist.github.com/Rich-Harris/eb1726bd0466efbab89e436166ba1bbd) explaining what I mean in more detail.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/759#issuecomment-470227132

Received on Wednesday, 6 March 2019 18:47:03 UTC