sassrolluplit

using scss with lit custom elements?


Just wondering if rollup-plugin-scss-lit is still the best way to use scss files with lit custom html elements. The last I saw were SO posts from 2022 or so, nothing on the lit site when searching for scss.


Solution

  • Currently, there are no much information for using scss (or any of the css preprocessors) with lit-element but read about that plugin rollup-plugin-scss-lit.

    If you don't like that, you can also check rollup-plugin-lit-css, this is for css but there is the part where you can include 'scss' and set how to transform it to css

    Also if I am guessing correctly, you are using rollup for your bundling, if yes you can read up on how to use scss with rollup. You can also check rollup-plugin-sass to see if that will help you