/esbuild-plugin-svgo

SVGO plugin for esbuild.

Primary LanguageTypeScriptMIT LicenseMIT

@hyrious/esbuild-plugin-svgo

SVGO plugin for esbuild.

Usage

const { svgo } = require("@hyrious/esbuild-plugin-svgo");

require("esbuild").build({
  entryPoints: ["app.js"],
  bundle: true,
  outfile: "out.js",
  plugins: [svgo()],
  loader: { '.svg': 'dataurl' },
}).catch(() => process.exit(1));

Options

export function svgo(config?: Config): Plugin;

See SVGO Options.

License

MIT @ hyrious