An open API service indexing awesome lists of open source software.

https://github.com/plxity/esbuild-cross-browser-css

An ESBuild plugin to make CSS compatible for all browsers.
https://github.com/plxity/esbuild-cross-browser-css

css esbuild esbuild-loader vendor-prefix

Last synced: about 1 month ago
JSON representation

An ESBuild plugin to make CSS compatible for all browsers.

Awesome Lists containing this project

README

        

## ESBuild Cross Browser CSS Plugin

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

**Input**

```css
div{
display: flex
}
```

**Output**

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

## Use

**Create a file**

`esbuild.config.js`
```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));
```