jspm-bundler is a Node.js build tool providing advanced, configurable bundling for applications built with JSPM. It allows developers to define and manage their bundle manifests in an external JavaScript file, `bundles.js`, rather than directly modifying `config.js`. This approach simplifies version control, enables independent updates of bundle configurations, and is especially useful in environments where `config.js` is dynamically generated or managed. The library supports bundling specific module groups, offers robust exclusion capabilities for packages or groups, implements cache busting through generated file checksums, and can produce self-extracting (static) bundles. Currently at version 0.1.11, the package demonstrates a maintenance cadence with recent updates addressing bug fixes, dependency compatibility, and adding new configuration options like `packagePath` and `configFile`. It serves a niche within the JSPM ecosystem by offering more granular control over the bundling process compared to JSPM's built-in bundler.
npm install jspm-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the bundler with a configuration, specifying bundle groups, and executing a bundle operation for a specific group.
Update your configuration to use `dest` and `file` instead of the old names. For example, `dest: 'bundles'` instead of `bundleDest: 'bundles'`.
Remove any `gzip` related configuration options from your bundler setup. If gzip compression is required, it must be handled as a separate post-processing step outside of jspm-bundler.
If using self-extracting bundles, set `bust: false`. If cache busting is critical, avoid `sfx: true` and rely on standard JSPM bundles and `bust` functionality.
Exercise caution when using specific JSPM versions with jspm-bundler. If encountering unexpected bundling issues, check the `jspm-bundler` release notes for known JSPM compatibility concerns and consider pinning to a known stable JSPM version.
Ensure that `bundler.baseURL` is identical to `System.baseURL` configured for your JSPM project. Mismatches can lead to module resolution errors during bundling.
Use CommonJS `require` syntax: `var Bundler = require('jspm-bundler');`Verify that all specified file paths and names are valid and accessible for writing. Avoid invalid characters or conflicting directory/file names.
Update `jspm-bundler` to version `0.1.7` or newer, which contains a fix for this bug.
Update `jspm-bundler` to version `0.1.2` or newer. If staying on an older version, treat `unbundle()` as synchronous or use callbacks where applicable.