Skip to content

crimx/export-size-svg

Repository files navigation

export-size-svg

Generate SVG charts of minimized sizes for selected exports.

Docs Build Status npm-version

Example

@embra/reactivity

Usage

Add a .export-size-svg.mjs configuration file to your project root.

import { defineConfig } from "export-size-svg";

export default defineConfig({
  exports: [
    { title: "Total", code: `export * from "./src"` },
    { title: "Core", code: `export { hello } from "./src"` },
    { title: "Total without Core", code: `export * from "./src"`, externals: ["./core"] },
  ],
});

Usage in CLI

npx export-size-svg --out ./docs/images

Usage in package

  1. Install the package:
    npm install export-size-svg --save-dev
  2. package.json:
    {
      "scripts": {
        "export-size": "export-size-svg --out ./docs/images"
      }
    }

Options

See Docs

About

Generate SVG charts of minimized sizes for selected exports.

Resources

License

Stars

Watchers

Forks