esmcss (v0.2.15) enables importing CSS via JavaScript/TypeScript modules (.css.ts/.css.js) and provides focused CSS helper classes, built on esbuild >=0.23.1. It allows you to co-locate styles with components, leveraging esbuild's bundling for zero-runtime CSS. Frequent releases, with a focus on ESM-only workflows and esbuild integration. Differentiates from CSS-in-JS by generating static CSS files during build, avoiding runtime overhead.
npm install esmcssNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows defining a css tagged template literal with size helpers and using esbuild plugin.
Update esbuild to 0.23.1 or later.
Replace createTheme with css tagged template literals and CSS custom properties.
Use `import('esmcss')` in CommonJS or switch to ESM.Place esmcssPlugin() early in the plugins array.
Use `${md}` inside css`...` template literal.Run `npm install esbuild@latest` to update to >=0.23.1.
Use `import { css } from 'esmcss'` instead of `import css from 'esmcss'`.Install esmcss and import from 'esmcss/esbuild' correctly: `import { esmcssPlugin } from 'esmcss/esbuild'`.