Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.25 KB

README.md

File metadata and controls

52 lines (38 loc) · 2.25 KB

License: WTFPL TypeScript code style: prettier npm version npm version libraries.io FOSSA Status semantic-release

esbuild-plugin-less

esbuild plugin for less files.

Installation

yarn add esbuild-plugin-less -D

Usage

You can see the example here.

import { build } from 'esbuild';
import { lessLoader } from 'esbuild-plugin-less';

build({
  entryPoints: [path.resolve(__dirname, 'index.ts')],
  bundle: true,
  outdir: path.resolve(__dirname, 'output'),
  plugins: [lessLoader()], // Just plug in
  loader: {
    '.ts': 'ts',
  },
});

Configuration

lessLoader(lessOptions: Less.Options = {}, loaderOptions: LoaderOptions = {})
  • options — Accepts all valid options from less.js. You can find a complete list of options here.
  • loaderOptions — Options for the loader. Supports custom esbuild filter.

License

esbuild-plugin-less is WTFPL licensed.

FOSSA Status