0.3.5 • Published 2 years ago

@hyrious/esbuild-plugin-style v0.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@hyrious/esbuild-plugin-style

The missing style-loader for esbuild.

Usage

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:

import "./style.css";
console.log(1);
body { color: red; }

Outputs (things like):

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

Options

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

License

MIT @ hyrious

0.3.5

2 years ago

0.3.4

3 years ago

0.3.2

3 years ago

0.3.3

3 years ago

0.3.0

3 years ago

0.3.0-beta.0

3 years ago

0.3.1

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago