Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 625 Bytes

readme.md

File metadata and controls

45 lines (33 loc) · 625 Bytes

ESBuild Cross Browser CSS Plugin

An ESBuild plugin to add support for cross-browser CSS.

Example

Input

div{
  display: flex
}

Output

div{
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

Use

Create a file

esbuild.config.js

import esbuild from 'esbuild';
import CrossBrowserCSS from 'esbuild-plugin-cross-browser-css';

esbuild
    .build({
        entryPoints: ... // Input file
        bundle: true,
        outfile: ... // Output file
        plugins: [CrossBrowserCSS()]
    })
    .catch(() => process.exit(1));