# esbuild-plugin-esmcss

> Build *.css.ts/*.css.js modules as css assets.

Latest version **0.1.14** (published 2026-03-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install esbuild-plugin-esmcss
pnpm add esbuild-plugin-esmcss
yarn add esbuild-plugin-esmcss
bun add esbuild-plugin-esmcss
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2026-03-14 |
| First published | 2024-02-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Brian Takita |
| Maintainers | btakita |
| Keywords | css, esm, esbuild |

## Links

- npm: https://www.npmjs.com/package/esbuild-plugin-esmcss
- Repository: https://github.com/esmfile/esbuild-plugin-esmcss
- Homepage: https://github.com/esmfile/esbuild-plugin-esmcss#readme
- Issues: https://github.com/esmfile/esbuild-plugin-esmcss/issues
- npm.io page: https://npm.io/package/esbuild-plugin-esmcss

## Dependencies (1)

- [esmcss](https://npm.io/package/esmcss.md) *

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.1.14 (latest) — 2026-03-14
- 0.1.13 — 2026-03-04
- 0.1.12 — 2024-08-31
- 0.1.11 — 2024-07-02
- 0.1.10 — 2024-06-10
- 0.1.9 — 2024-05-25
- 0.1.8 — 2024-05-17
- 0.1.7 — 2024-05-14
- 0.1.6 — 2024-05-07
- 0.1.5 — 2024-05-07
- 0.1.4 — 2024-03-20
- 0.1.3 — 2024-03-15
- 0.1.2 — 2024-03-05
- 0.1.1 — 2024-02-19
- 0.1.0 — 2024-02-19

## README

# esbuild-plugin-esmcss

Build *.css.ts/*.css.js modules as css assets.

## install

[//]: @formatter:off
```
npm i -D esbuild-plugin-esmcss
```
[//]: @formatter:on

## usage

Build file

[//]: @formatter:off
```ts
import { build } from 'esbuild'
import esmcss from 'esbuild-plugin-esmcss'
await build({
  entryPoints: [/* source code entry point */],
  plugins: [esmcss()]
})
```
[//]: @formatter:on

Component file

[//]: @formatter:off
```ts
import './component.css.js'
export function html_() {
  return `
<!DOCTYPE html>
<html>
  <head>
  link_({ rel: 'stylesheet', type: 'text/css', href })
    <link rel="stylesheet" type="text/css" href="/path/to/cssBundle.css">
  </head>
  <body>
    <div class="my_component">Hello!</div>
  </body>
</html>
  `.trim()
}
```
[//]: @formatter:on

component.css.ts

[//]: @formatter:off
```ts
export default ()=>`
.my_component {
  color: green;
}
`
```
[//]: @formatter:on

---
_Source: https://npm.io/package/esbuild-plugin-esmcss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
