Skip to content
HALOWERK

Codewerk

bundle size

Builds the same caller-supplied project three ways using installed esbuild 0.28.2 (MIT): bundled without minification or tree-shaking, minified without tree-shaking, then minified with optional tree-shaking. Reports exact output byte lengths, level-9 gzip size, source bytes, per-input contributions and unused provided files. All imports resolve exclusively inside the supplied in-memory file map or explicit aliases; no npm installation, host-file resolution, network or user plugins..

POST https://code.halowerk.com/v1/bundle-size

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
entrystringYes
filesobjectYes
aliasesobjectNo
formatSee schemaNo
tree_shakingbooleanNo
include_bundlebooleanNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "entry",
    "files"
  ],
  "properties": {
    "entry": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
    },
    "files": {
      "type": "object",
      "minProperties": 1,
      "maxProperties": 16,
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 16384
      }
    },
    "aliases": {
      "type": "object",
      "maxProperties": 16,
      "default": {},
      "propertyNames": {
        "type": "string",
        "pattern": "^[@A-Za-z0-9][@A-Za-z0-9._/-]{0,127}$"
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
      }
    },
    "format": {
      "enum": [
        "esm",
        "iife",
        "cjs"
      ],
      "default": "esm"
    },
    "tree_shaking": {
      "type": "boolean",
      "default": true
    },
    "include_bundle": {
      "type": "boolean",
      "default": false
    }
  }
}

Open original schema

Published input example

{
  "entry": "main.js",
  "files": {
    "main.js": "import {add} from \"./math.js\"; export const answer=add(2,3);",
    "math.js": "export const add=(a,b)=>a+b;"
  },
  "format": "esm"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’