Bayrell Bundler for Node.js

raw JSON →
0.10.11 verified Sat Apr 25 auth: no javascript maintenance

Bayrell Bundler for Node.js (v0.10.11) is a module bundler designed for the Bayrell ecosystem, focusing on packaging JavaScript/TypeScript code into optimized bundles. It is part of the Bayrell project and primarily supports Node.js environments. The package has a low release cadence (last release Oct 2020) and limited documentation. Compared to mainstream bundlers like Webpack or Rollup, it is specialized for Bayrell-specific workflows and may not be suitable for general-purpose bundling.

error TypeError: bayrell_bundler_nodejs_1.default is not a function
cause Improper import of default export using wrong syntax (e.g., require).
fix
Use 'import BayrellBundler from 'bayrell-bundler-nodejs''
error Module not found: Error: Can't resolve 'bayrell-bundler-nodejs'
cause Package not installed or missing from dependencies.
fix
Run 'npm install bayrell-bundler-nodejs'
breaking Version 0.10.0 dropped CommonJS support; ESM-only imports required.
fix Use ES module imports (import/export) instead of require().
gotcha The package has minimal documentation; configuration options are not fully documented.
fix Refer to source code or Bayrell project documentation for configuration details.
deprecated Bayrell Bundler is in maintenance mode; no new features planned.
fix Consider migrating to an actively maintained bundler like Webpack or Rollup.
gotcha BundleConfig class may not support all web/browser features; designed primarily for Node.js modules.
fix Test bundle output for browser compatibility if targeting browsers.
npm install bayrell-bundler-nodejs
yarn add bayrell-bundler-nodejs
pnpm add bayrell-bundler-nodejs

Demonstrates creating a bundle config and running the bundler with an entry point and output path.

import BayrellBundler, { BundleConfig } from 'bayrell-bundler-nodejs';

const config = new BundleConfig();
config.entry = './src/index.js';
config.output = './dist/bundle.js';

const bundler = new BayrellBundler(config);
bundler.bundle().then(() => console.log('Bundled successfully!')).catch(err => console.error(err));