From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Tool:Esbuild" |
|---|
| claim | "esbuild's runtime (internal/runtime/runtime.go) defines helpers named __commonJS, __esm, __toESM, __toCommonJS, __export, __reExport, __publicField, __name, __require and many more, but a bundle contains only those it uses: the runtime source says 'Tree shaking automatically removes unused code from the runtime'. A bundle with no CommonJS input has no __commonJS; __name appears with --keep-names (and in the decorator helper, which calls it as well); a plain ESM bundle may have none of them. Their presence (e.g. 'var __commonJS = (cb, mod) => function __require()') marks esbuild output, their absence does not rule esbuild out. Other bundlers copy similar names, so use several together." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "Tool:Esbuild" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "search for helper names" |
|---|
| indicator | "var __commonJS = (cb, mod) => function __require() { (together with __toESM, __export, __copyProps, __defProp)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "export var declarations of the runtime (__commonJS line 193, __esm 173, __toESM 253, __export 209, __reExport 244, __toCommonJS 269, __publicField 338, __name 115, __require 123) and the header comment line 6 'Tree shaking automatically removes unused code from the runtime'" |
|---|
| repo | "https://github.com/evanw/esbuild" |
|---|
| commit | "f6058f8364fe7ab91ca57a83e02577ed74c9cae4" |
|---|
| path | "internal/runtime/runtime.go" |
|---|
| lines | "1-8, 115, 123, 173, 193, 209, 244, 253, 269, 338" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:53:59.297Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:39:36.209Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read runtime.go at f6058f8364fe: line 6 tree-shaking comment, __name at 115 and its second use at 314 in the decorator helper. Other export var line numbers not re-counted." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T02:46:53.823Z" |
|---|
| summary | "Helpers are emitted only when used (runtime.go: tree shaking removes unused runtime code); the list was every helper, not what a given bundle contains" |
|---|
| changed | | "claim" |
| "data" |
| "evidence replaced" |
|
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T03:49:53.305Z" |
|---|
| summary | "Earlier correction said __name appears only with --keep-names; runtime.go line 314 (decorator helper __decorateClass) also calls __name, so decorators produce it without that flag." |
|---|
| changed | |
|---|
|
|
|---|