I am using ESBuild with this very simple config.js file. I would love to utilise the postcss autoprefixer plugin however am having difficulty knowing how to add it to my CSS compiling section. Would anybody be able to help me solve this ?
// Tools
import { fileURLToPath } from 'url';
import path from 'path';
import esbuild from "esbuild";
import postcss from "postcss";
import autoprefixer from "autoprefixer";
// CSS files
const cssFiles = [ "assets/pre-bundle-css/style.css" ]
// Compiles nested CSS files to CSS
const cssContext = await esbuild.context({
entryPoints: cssFiles,
outdir: "assets/css",
minify: false,
bundle: true,
sourcemap: true
})
await cssContext.watch();