Compiles JavaScript files along with all their imported dependencies using Babel, automatically resolving and compiling transitive dependencies that are not explicitly listed. Version 2.1.0 (latest) with no recent updates. Key differentiators: unlike direct Babel usage, babel-deps discovers and compiles the entire dependency graph, caches results for performance, and allows custom module resolution. Supports Node >=0.12.0 (legacy).
npm install babel-depsVerified import paths — ran on the pinned version, not inferred.
Demonstrates compiling a file and its dependencies with Babel, using cache and custom Babel options.
Consider using a modern tool like Webpack, Babel CLI alone, or Rollup for dependency compilation.
Always provide `options.filename` for every file in the array.
Implement `resolveModuleToPath` function for packages that are not paths.
Ensure each file object has `contents` and `options: { filename: 'path/to/file.js' }`.Provide a `resolveModuleToPath` function that converts module names to file paths.
No dependency data recorded yet.