Aurelia Bundler (SystemJS)

0.7.0 · abandoned · verified Wed Apr 22

aurelia-bundler is a utility library specifically designed for bundling JavaScript, HTML, and CSS assets within applications built using the Aurelia 1 framework, leveraging SystemJS as the module loader. It provides programmatic APIs, commonly integrated into build automation tools like Gulp, to consolidate application modules and their dependencies into optimized bundles for production deployment. The package is considered abandoned, with its last release, version 0.7.0, dating back approximately eight years. It has been superseded by the built-in bundler provided by the Aurelia CLI for Aurelia 1 projects, and is not compatible with Aurelia 2, which has transitioned to modern bundlers such as Vite, Webpack, or Parcel. The package primarily addresses the bundling needs of legacy Aurelia 1 applications that explicitly relied on the SystemJS module ecosystem. Its release cadence was irregular towards the end of its active lifecycle, focusing on minor updates and bug fixes.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates programmatic use of aurelia-bundler within a Gulp task to create application and vendor bundles for an Aurelia 1 SystemJS project.

import gulp from 'gulp';
import { bundle } from 'aurelia-bundler';

const config = {
  force: true,
  baseURL: '.', // Relative path to your project root
  configPath: './config.js', // Path to your SystemJS config file
  bundles: {
    "dist/app-build": {
      includes: [
        '[*.js]', // Include all JS files
        '*.html!text', // Include all HTML templates as text
        '*.css!text', // Include all CSS files as text
        // Add other Aurelia modules or your app-specific modules here
      ],
      options: {
        inject: true,
        minify: true
      }
    },
    "dist/vendor-build": {
      includes: [
        'aurelia-bootstrapper',
        'aurelia-fetch-client',
        'aurelia-router',
        'aurelia-animator-css',
        // Add other vendor dependencies here
      ],
      options: {
        inject: true,
        minify: true
      }
    }
  }
};

gulp.task('bundle', function() {
  console.log('Starting Aurelia bundling...');
  return bundle(config)
    .then(() => console.log('Aurelia bundling complete!'))
    .catch(err => console.error('Aurelia bundling error:', err));
});

// To run this: ensure gulp and aurelia-bundler are installed as dev dependencies.
// Then run 'gulp bundle' from your terminal.

view raw JSON →