@chialab/esbuild-plugin-postcss
TypeScript icon, indicating that this package has built-in type declarations

0.18.0 • Public • Published

Esbuild Plugin Postcss • A CSS loader plugin for esbuild that uses postcss as preprocessor.

NPM


Install

npm i @chialab/esbuild-plugin-postcss -D
yarn add @chialab/esbuild-plugin-postcss -D

Usage

import esbuild from 'esbuild';
import postcssPlugin from '@chialab/esbuild-plugin-postcss';

await esbuild.build({
    plugins: [
        postcssPlugin(),
    ],
});

This plugin looks for a postcss configuration in the project and fallbacks to out custom postcss-preset-env.

Sass

The plugin automatically tries to load the @chialab/postcss-plugin-dart-sass when it processes .scss files. Please make sure to have installed the optional dependency in order to correctly transpiler Sass files:

npm i @chialab/postcss-plugin-dart-sass -D
yarn add @chialab/postcss-plugin-dart-sass -D

License

Esbuild Plugin Postcss is released under the MIT license.

Package Sidebar

Install

npm i @chialab/esbuild-plugin-postcss

Weekly Downloads

132

Version

0.18.0

License

MIT

Unpacked Size

15.1 kB

Total Files

5

Last publish

Collaborators

  • chialab-admin
  • chialab-developers