Socket
Book a DemoInstallSign in
Socket

@hyrious/esbuild-plugin-style

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyrious/esbuild-plugin-style

The missing style loader for esbuild.

latest
Source
npmnpm
Version
0.3.5
Version published
Weekly downloads
186
118.82%
Maintainers
1
Weekly downloads
 
Created
Source

@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

Keywords

esbuild

FAQs

Package last updated on 21 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts