GitHunt
PL

plxity/esbuild-cross-browser-css

An ESBuild plugin to make CSS compatible for all browsers.

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));

Languages

JavaScript100.0%

Contributors

Created October 16, 2021
Updated April 2, 2024
plxity/esbuild-cross-browser-css | GitHunt