Bundt is a minimalistic JavaScript module bundler designed for simplicity and focused on efficient module processing. As of version 1.1.5, it provides core bundling capabilities suitable for libraries and smaller applications, emphasizing a straightforward API rather than extensive configuration. It maintains an active release cadence, with recent patches addressing minor bugs and edge cases related to import/export rewriting. Its primary differentiator is its lightweight nature, offering a less opinionated alternative to larger bundlers like Webpack or Rollup, particularly for scenarios where complex build pipelines are not required. It aims to deliver modules without excessive overhead or configuration.
npm install bundtVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically use Bundt to bundle a JavaScript entry file into an output bundle, specifying format and sourcemap options.
Review code for `import` or `export` statements embedded in string literals or template literals. Ensure they conform to expected module syntax and are not being unintentionally rewritten.
For complex projects requiring advanced optimizations, extensive plugin support, or specific framework integrations, consider evaluating more feature-rich bundlers. For simpler libraries or applications, Bundt's minimalistic approach can be advantageous.
Explicitly set the `format` option to match your target environment. If mixing CJS and ESM, verify Bundt's behavior or pre-process modules to a consistent format if issues arise.
Verify the module path is correct relative to the importing file or specified in `entry` option. Ensure the file actually exists on the filesystem.
Ensure your Node.js environment supports ESM if you're directly running bundled ESM code. If using Bundt, check the `format` option in your configuration; set it to 'cjs' if targeting a CommonJS environment.
Use `import { bundt } from 'bundt';` for modern Node.js environments. Ensure your file is treated as an ESM module (e.g., `.mjs` extension or `"type": "module"` in `package.json`).No dependency data recorded yet.