Vite plugin for solid-styled, a CSS-in-JS library for SolidJS. Current stable version is 0.12.1 with weekly releases. It provides Vite integration with HMR, PostCSS preprocessing, and LightningCSS support. Key differentiators: built-in PostCSS (autoprefixer, nested, cssnano), SSR-friendly style registry, and <style jsx> syntax similar to styled-jsx. Unlike vanilla CSS or other CSS-in-JS solutions, it offers scoped styles with deterministic hash generation for consistent SSR. Requires solid-styled >=0.9 and Vite >=3.
npm install vite-plugin-solid-styledVerified import paths — ran on the pinned version, not inferred.
Configures Vite with vite-plugin-solid-styled for SolidJS, enabling scoped CSS and PostCSS processing.
Remove any postcss.config.js reliance. If using PostCSS plugins, they are pre-configured via lightningcss.
Update to v0.9+ to avoid PostCSS dependency.
Use `mode: 'ssr'` instead of `ssr: true`.
Remove any manual `use:solid-styled` usage; the plugin handles it automatically.
Ensure `filter.include` covers all component files containing `<style jsx>` or `css` template literals.
Run `npm install vite-plugin-solid-styled solid-styled vite`.
Install solid-styled: `npm install solid-styled`.
Use ESM import: `import solidStyled from 'vite-plugin-solid-styled'`.