Files
scriptc/docs/content/docs
Malte UblandClaude Opus 5.5 d9d3dc2517 Keep __dirname and __filename in TypeScript files that load as ES modules
A .ts or .tsx file with import syntax is an ES module under Node's strip-types rule, which has no __dirname or __filename. TypeScript projects are commonly shipped as CommonJS bundles where both exist, and @types/node declares them for every file. scriptc now compiles them in such files to the module's source path, the same compile-time constants as in CommonJS and the same strings as import.meta.dirname and import.meta.filename. JavaScript ES modules keep the fence. The limitations page documents the difference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:46:46 -07:00
..
2026-10-18 17:47:55 -05:00
2026-10-18 09:55:59 -05:00