Bit-Bundler is a JavaScript bundler designed for web applications, offering features like custom bundle output for advanced circular dependency handling across bundle splits since version 12.0.0. Initially, it used `browser-pack` but transitioned to a custom bundler. It supports various input types, including globs and objects with content, path, and name fields for module resolution. The package prioritizes ease of use for bundling directly supplied content strings or buffers. The latest specified version is 11.0.2, though version 12.1.2 was released in 2019. The project appears to be in an abandoned state, with no significant activity or releases since 2019, making it less suitable for new, actively developed projects. Its primary interface is through CommonJS `require` statements, which might not align with modern ESM-first development.
npm install bit-bundlerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to bundle inline JavaScript content with Bit-Bundler, creating a basic output file. It showcases the `content` option introduced in v10 and uses the `bundle` API.
Review your existing bundling configurations and output expectations. Test thoroughly after upgrading to v12 to ensure compatibility, especially if you relied on specific `browser-pack` behaviors.
Update your bundling configuration to use `content: '...'` instead of `contents: '...'`. For example, `Bitbundler.bundle({ dest: 'out.js', content: '...' })`.Ensure your project is configured to use CommonJS modules if integrating Bit-Bundler. If your project is ESM-first, you might need a transpilation step or consider alternative bundlers that natively support ESM.
For new projects or existing projects requiring active maintenance, consider migrating to a actively developed bundler. If you must use `bit-bundler`, thoroughly audit its dependencies and usage for potential security vulnerabilities.
Ensure your environment supports CommonJS modules, or use a tool like Babel or Webpack to transpile your ESM code to CommonJS before bundling. Alternatively, consider using a bundler with native ESM support.
Verify that you are using `const Bitbundler = require('bit-bundler');` to correctly import the module. Avoid `import { Bitbundler } from 'bit-bundler';` as it's not designed for named ESM imports.Check your bundler configuration. If using v10.0.0 or higher, change `contents: 'your code'` to `content: 'your code'`.
No dependency data recorded yet.