A Webpack plugin for bundling Aurelia applications, enabling proper module resolution and runtime support. Current stable version is 5.0.6, with active development. It supports Webpack 5+ and includes TypeScript type definitions. Key differentiators include automatic dependency serialization, support for Aurelia's DI and templating, and compatibility with various Webpack features like code splitting and tree shaking. Compared to manual configuration, it simplifies setup and avoids common pitfalls with Aurelia module loading.
npm install aurelia-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Minimal webpack config that bundles an Aurelia app using the AureliaPlugin with bootstrapper entry.
If using vendor entry, upgrade to a single entry or use webpack's splitChunks instead.
Upgrade to Webpack 4 or 5, or stick with aurelia-webpack-plugin 2.x for Webpack 2/3.
Remove vendor entry and configure optimization.splitChunks in webpack config.
Ensure AureliaPlugin is placed last or after entry-modifying plugins in the plugins array.
Add 'aurelia-bootstrapper' to entry or use resolve.alias to point to node_modules.
Run 'npm install aurelia-bootstrapper' and ensure entry is 'aurelia-bootstrapper'.
Use aurelia-webpack-plugin v4 for webpack 4, or upgrade to webpack 5.
Use const { AureliaPlugin } = require('aurelia-webpack-plugin') or import { AureliaPlugin } from 'aurelia-webpack-plugin'.