This is an example Vite project using Lit 2, Typescript, and Sass imports.
npm i -D sass
src/my-element.ts
to src/my-element.scss
and imported them with import styles from './my-element.scss?inline';
typings/
tsconfig.json
to include typings/
directoryvite.config.ts
N.B. Since Vite does does not yet handle Lit HMR, Vite triggers a full reload for Lit files, but SASS files currently only trigger a hot module reload which will not update Lit without manually triggering a reload. Follow this issue for more details or wait until Lit HMR is released.