A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
[X] I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
I'm doing some testing with style modes for components and it seems that all the css is output in the javascript file that is generated for the component.
I would have hoped that the css would be in dedicated css files per style mode, like the source, and that only the one that is active/needed would be loaded when the component is first rendered.
As far as I could find this is not possible right now?
Describe the Use Case
To reduce the size of the component that is sent over the wire it would be handy to have style modes load only the css of the required mode.
Describe Preferred Solution
Only the css for the active mode is loaded for the component.
Hey @beele! This sounds like something that could be a nice boost to Stencil. Gonna label this as a potential future feature to judge community interest!
Prerequisites
Describe the Feature Request
I'm doing some testing with style modes for components and it seems that all the css is output in the javascript file that is generated for the component. I would have hoped that the css would be in dedicated css files per style mode, like the source, and that only the one that is active/needed would be loaded when the component is first rendered.
As far as I could find this is not possible right now?
Describe the Use Case
To reduce the size of the component that is sent over the wire it would be handy to have style modes load only the css of the required mode.
Describe Preferred Solution
Only the css for the active mode is loaded for the component.
Describe Alternatives
No response
Related Code
No response
Additional Information
No response