ts-transformer-inline-file
JSON →A TypeScript custom transformer that inlines file contents at compile-time. Version 0.2.0 is the latest stable release; the project appears to have no recent activity. It transforms $INLINE_FILE() calls to string literals and $INLINE_JSON() calls to object literals, with support for destructuring to include only selected properties. Unlike runtime fs.readFileSync, this avoids bundling cost and enables minification. Requires TypeScript >=4.0 and uses peer dependency on typescript. Configuration requires a transformer wrapper (ttypescript, rollup-plugin-typescript2, or ts-loader). Ships TypeScript types but is itself ESM/CJS compatible.
Resources
packagets-transformer-inline-file ↗