Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/vite-plugin-lit-css.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"vite-plugin-lit-css": minor
---

Add Vite plugin for importing CSS files as Lit tagged template literals

This new package provides a Vite plugin that transforms CSS imports into Lit's `css` tagged template literals, enabling seamless CSS-in-JS workflow for Lit components in Vite projects.

Features:
- Works with both Vite dev server and build modes
- Supports virtual module system for proper module resolution
- Handles bare specifiers, relative paths, and aliases via Vite's resolution system
- Compatible with multiple CSS preprocessor extensions (`.css`, `.scss`, `.sass`, `.less`, `.styl`)
- Leverages the core `@pwrs/lit-css` transform library
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ In the mean time, enjoy importing your CSS into your component files.

- [Shared Logic](./packages/lit-css)
- [esbuild](./packages/esbuild-plugin-lit-css)
- [Webpack](./packages/lit-css-loader)
- [TypeScript](./packages/typescript-transform-lit-css)
- [Rollup](./packages/rollup-plugin-lit-css)
- [Webpack](./packages/lit-css-loader)
- [Vite](./packages/vite-plugin-lit-css)
- [Parcel](./packages/parcel-transformer-lit-css)
- [TypeScript](./packages/typescript-transform-lit-css)
Loading