babel-bits is an npm package designed to integrate Babel 6 transformations within the bit-imports and bit-bundler ecosystems. It acts as a handler for JavaScript files, allowing them to be transpiled during the import or bundling process. The package, currently at its last stable version v1.0.1 released in 2017, wraps `babel-core` (v6) along with `babel-preset-es2015` and `babel-preset-react` as default configurations. The project and its parent `bit-imports` and `bit-bundler` dependencies appear to be abandoned, with no significant updates or maintenance since 2017. Key differentiators included its deep integration with the specific module loading and bundling mechanisms of `bit-imports` and `bit-bundler`, offering a pre-configured, albeit outdated, Babel setup for those systems. It does not follow a regular release cadence and is effectively end-of-life.
npm install babel-bitsVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to configure `babel-bits` as a transformation handler within `bit-imports`, enabling Babel 6 transpilation for loaded JavaScript files.
Downgrade your Babel setup to Babel 6 if you must use babel-bits, or migrate away from babel-bits and the bit-imports/bit-bundler ecosystem to a modern bundler like Webpack or Rollup with Babel 7+.
Migrate your project to a currently maintained module bundler (e.g., Webpack, Rollup, Vite) and a modern Babel setup (Babel 7+).
Load the `regenerator-runtime` package (e.g., `require('regenerator-runtime/runtime')` or include via a script tag) at the entry point of your application before any transpiled generator code executes.Ensure `babel-core`, `babel-preset-es2015`, and `babel-preset-react` (all `^6.0.0`) are installed as direct dependencies. Do NOT install `@babel/core` or other `@babel/` scoped packages.
Install `regenerator-runtime` (`npm install regenerator-runtime`) and import it once at the top of your application's entry file: `require('regenerator-runtime/runtime');` or ensure it's loaded via a script tag in the browser.