# @hyrious/esbuild-plugin-style

> The missing style loader for esbuild.

Latest version **0.3.5** (published 2022-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hyrious/esbuild-plugin-style
pnpm add @hyrious/esbuild-plugin-style
yarn add @hyrious/esbuild-plugin-style
bun add @hyrious/esbuild-plugin-style
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2022-03-21 |
| First published | 2021-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | hyrious |
| Maintainers | hyrious |
| Keywords | esbuild, plugin, style, css |

## Links

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

## 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.3.5 (latest) — 2022-03-21
- 0.3.0-beta.0 (beta) — 2021-07-12
- 0.3.4 — 2021-10-10
- 0.3.3 — 2021-07-27
- 0.3.2 — 2021-07-26
- 0.3.1 — 2021-07-13
- 0.3.0 — 2021-07-12
- 0.2.2 — 2021-07-11
- 0.2.1 — 2021-06-11
- 0.2.0 — 2021-06-11
- 0.1.1 — 2021-05-10
- 0.1.0 — 2021-05-10

## README

# @hyrious/esbuild-plugin-style

The missing style-loader for esbuild.

## Usage

```js
const { style } = require("@hyrious/esbuild-plugin-style");

require("esbuild").build({
  entryPoints: ["app.js"],
  bundle: true,
  outfile: "out.js",
  plugins: [style()],
}).catch(() => process.exit(1));
```

Given such app.js and style.css:

```js
import "./style.css";
console.log(1);
```

```css
body { color: red; }
```

Outputs (things like):

```js
let style = document.createElement("style");
style.append("body { color: red }");
document.head.append(style);
console.log(1);
```

### Options

```ts
export function style({ minify = true, charset = "utf8" }): Plugin;
```

## License

MIT @ [hyrious](https://github.com/hyrious)

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