Registry / web-framework / aurelia-webpack-plugin

aurelia-webpack-plugin

JSON →
library5.0.6jsnpmunverified

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-plugin
INSTALL
IMPORT
SIG · AURELIA-WEBPACK-PL
A
aurelia-webpack-plugin
web-frameworkjavascriptv5.0.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AureliaPlugin
import { AureliaPlugin } from 'aurelia-webpack-plugin'
const AureliaPlugin = require('aurelia-webpack-plugin')
CommonJS require works but TypeScript/ESM import is preferred. Default export is not available; use named import.
AureliaPlugin (CommonJS)
const { AureliaPlugin } = require('aurelia-webpack-plugin')
const AureliaPlugin = require('aurelia-webpack-plugin').default
There is no default export. Always destructure the named export.
ModuleDependenciesPlugin
import { ModuleDependenciesPlugin } from 'aurelia-webpack-plugin'
const ModuleDependenciesPlugin = require('aurelia-webpack-plugin').ModuleDependenciesPlugin
Also exported for advanced usage; same import pattern as AureliaPlugin.

Minimal webpack config that bundles an Aurelia app using the AureliaPlugin with bootstrapper entry.

// webpack.config.js const { AureliaPlugin } = require('aurelia-webpack-plugin'); const path = require('path'); module.exports = { entry: { app: ['aurelia-bootstrapper'] }, output: { path: path.resolve(__dirname, 'dist'), filename: '[name].bundle.js' }, plugins: [ new AureliaPlugin() ], resolve: { extensions: ['.ts', '.js'] } };
Debug
Known issues
breakingVersion 4.0.0 removed the runtime insertion hack for Webpack 3 and below; vendor entry points no longer have special handling.
fix
If using vendor entry, upgrade to a single entry or use webpack's splitChunks instead.
affects: >=4.0.0
breakingVersion 3.0.0 dropped support for Webpack 2/3; plugin only works with Webpack 4+.
fix
Upgrade to Webpack 4 or 5, or stick with aurelia-webpack-plugin 2.x for Webpack 2/3.
affects: >=3.0.0 <4.0.0
deprecatedUsing 'vendor' entry points is no longer recommended; use webpack's splitChunks optimization.
fix
Remove vendor entry and configure optimization.splitChunks in webpack config.
affects: >=4.0.0
gotchaPlugin must be instantiated after other plugins that modify entry (e.g., HtmlWebpackPlugin) to avoid interference.
fix
Ensure AureliaPlugin is placed last or after entry-modifying plugins in the plugins array.
affects: >=2.0.0
gotchaIf using TypeScript, ensure 'aurelia-bootstrapper' is resolved via module aliases or include it in entry directly.
fix
Add 'aurelia-bootstrapper' to entry or use resolve.alias to point to node_modules.
affects: >=5.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'aurelia-bootstrapper'
Missing or incorrect entry point name; aurelia-bootstrapper not installed or not in node_modules.
fix
Run 'npm install aurelia-bootstrapper' and ensure entry is 'aurelia-bootstrapper'.
TypeError: Cannot read property 'tapAsync' of undefined
Incompatible webpack version (e.g., using webpack 4 with plugin v5).
fix
Use aurelia-webpack-plugin v4 for webpack 4, or upgrade to webpack 5.
The 'AureliaPlugin' is not a constructor
Importing the module incorrectly, likely using default import instead of named.
fix
Use const { AureliaPlugin } = require('aurelia-webpack-plugin') or import { AureliaPlugin } from 'aurelia-webpack-plugin'.
Upgrade
Version history
5.0.6latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; plugin requires webpack >= 5.0.0
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
aurelia-webpack-plugin — npm install aurelia-webpack-plugin · libregistry