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.
Common errors
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'
Warnings
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.
Install
npm install bayrell-bundler-nodejs yarn add bayrell-bundler-nodejs pnpm add bayrell-bundler-nodejs Imports
- default wrong
const BayrellBundler = require('bayrell-bundler-nodejs')correctimport BayrellBundler from 'bayrell-bundler-nodejs' - BundleConfig wrong
const { BundleConfig } = require('bayrell-bundler-nodejs')correctimport { BundleConfig } from 'bayrell-bundler-nodejs' - bundler wrong
import bundler from 'bayrell-bundler-nodejs'correctimport { bundler } from 'bayrell-bundler-nodejs'
Quickstart
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));