An ESBuild plugin to add support for cross-browser CSS.
Input
div{
display: flex
}
Output
div{
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
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));