dr-transpiler is a JavaScript transpiler that replaces import statements with the actual imported code, effectively inlining dependencies. The current stable version is 1.0.3. It serves as a simple bundling alternative for small projects, performing static analysis to resolve local and npm imports. Unlike full-featured bundlers (Webpack, Rollup), it focuses solely on import replacement without tree-shaking or advanced optimizations.
npm install dr-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to transpile a string of code with a custom resolver to replace imports.
Avoid using dynamic imports or pre-process them.
Use synchronous resolution only or consider a bundler for async needs.
Provide a resolve function that reads files or maps content.
Install with npm install dr-transpiler and use import syntax.
Ensure resolve function returns a string (the source code) for every specifier.
No dependency data recorded yet.