js-bundler is a command-line tool designed for bundling JavaScript and CoffeeScript files, along with their 'required' dependencies, into a single output file. Currently at version 1.2.4, it was last published over 7 years ago, indicating an abandoned status. It differentiates itself from more feature-rich bundlers like Browserify by explicitly *not* providing Node.js built-in module shims or source mapping, aiming for a lightweight profile. This makes it suitable primarily for client-side browser or 'neutral' packages that do not rely on Node.js-specific modules. Its release cadence is effectively non-existent, given its age. Modern alternatives like Vite, Rollup, esbuild, and Parcel offer significantly faster build times, better developer experience, and more comprehensive feature sets, including native ES module support and advanced optimizations like tree-shaking, which js-bundler lacks.
npm install js-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic bundling of a main JavaScript file and its required dependency into a single output, first to stdout and then to a file named `bundle.js`.
Ensure all modules to be bundled are 'browser' or 'neutral' packages that do not depend on Node.js built-in modules. For Node.js-specific code, use conditional loading or a different bundler.
For production, consider minifying the output to obfuscate paths if `-i` was used. For debugging, rely on the `// ***** file-674497323404793172` comments for file demarcation or use the `-i` option cautiously.
Only use the `-i` option for testing or debugging. For deployable versions, ensure the output is minified with comment removal to prevent path disclosure.
Review the negation patterns (`-n`) to ensure they don't inadvertently exclude necessary files. Correct your code to avoid `require` statements for files intended to be excluded, or adjust the patterns.
Ensure that conditional logic (`if (environment === "server")`) robustly prevents `module.require` from being called in environments where it's not supported or where the module is not available.
Adjust your negation patterns (`-n`) or refactor your code to avoid requiring files that should be excluded. The process will exit with code 64 upon this error.
Ensure your project only requires 'browser-safe' modules, or manually shim/mock Node.js built-ins if absolutely necessary (though this tool is designed *without* such shims).
No dependency data recorded yet.