It depends on your setup, typically with webpack loaders or something similar. There is quite a bit of infrastructure involved. It's been a while since I delved into this stuff but I think it can be either compiled into CSS files that are then available to import with normal <link> tags, or injected into style tags in the document. I think the second option is used to load the new page styles when routing in single-page apps. I know I've hit some bugs in single-page apps with loading order effecting the resulting styles, which can be a pain.
I'm sure someone else knows more about this than me and might be able to chime in though!
I help others learn by doing through articles, videos, and courses about Javascript, React, and other tools of the web! https://colbyfayock.com/newsletter
It depends on your setup, typically with webpack loaders or something similar. There is quite a bit of infrastructure involved. It's been a while since I delved into this stuff but I think it can be either compiled into CSS files that are then available to import with normal
<link>
tags, or injected intostyle
tags in the document. I think the second option is used to load the new page styles when routing in single-page apps. I know I've hit some bugs in single-page apps with loading order effecting the resulting styles, which can be a pain.I'm sure someone else knows more about this than me and might be able to chime in though!
yeah - makes sense. good to know though, appreciate the info