{"id":18969,"library":"aurelia-webpack-plugin","title":"Aurelia Webpack Plugin","description":"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.","status":"active","version":"5.0.6","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/aurelia/webpack-plugin","tags":["javascript","aurelia","webpack","plugin","typescript"],"install":[{"cmd":"npm install aurelia-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add aurelia-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add aurelia-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin requires webpack >= 5.0.0","package":"webpack","optional":false}],"imports":[{"note":"CommonJS require works but TypeScript/ESM import is preferred. Default export is not available; use named import.","wrong":"const AureliaPlugin = require('aurelia-webpack-plugin')","symbol":"AureliaPlugin","correct":"import { AureliaPlugin } from 'aurelia-webpack-plugin'"},{"note":"There is no default export. Always destructure the named export.","wrong":"const AureliaPlugin = require('aurelia-webpack-plugin').default","symbol":"AureliaPlugin (CommonJS)","correct":"const { AureliaPlugin } = require('aurelia-webpack-plugin')"},{"note":"Also exported for advanced usage; same import pattern as AureliaPlugin.","wrong":"const ModuleDependenciesPlugin = require('aurelia-webpack-plugin').ModuleDependenciesPlugin","symbol":"ModuleDependenciesPlugin","correct":"import { ModuleDependenciesPlugin } from 'aurelia-webpack-plugin'"}],"quickstart":{"code":"// webpack.config.js\nconst { AureliaPlugin } = require('aurelia-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  entry: {\n    app: ['aurelia-bootstrapper']\n  },\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: '[name].bundle.js'\n  },\n  plugins: [\n    new AureliaPlugin()\n  ],\n  resolve: {\n    extensions: ['.ts', '.js']\n  }\n};","lang":"javascript","description":"Minimal webpack config that bundles an Aurelia app using the AureliaPlugin with bootstrapper entry."},"warnings":[{"fix":"If using vendor entry, upgrade to a single entry or use webpack's splitChunks instead.","message":"Version 4.0.0 removed the runtime insertion hack for Webpack 3 and below; vendor entry points no longer have special handling.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade to Webpack 4 or 5, or stick with aurelia-webpack-plugin 2.x for Webpack 2/3.","message":"Version 3.0.0 dropped support for Webpack 2/3; plugin only works with Webpack 4+.","severity":"breaking","affected_versions":">=3.0.0 <4.0.0"},{"fix":"Remove vendor entry and configure optimization.splitChunks in webpack config.","message":"Using 'vendor' entry points is no longer recommended; use webpack's splitChunks optimization.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Ensure AureliaPlugin is placed last or after entry-modifying plugins in the plugins array.","message":"Plugin must be instantiated after other plugins that modify entry (e.g., HtmlWebpackPlugin) to avoid interference.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Add 'aurelia-bootstrapper' to entry or use resolve.alias to point to node_modules.","message":"If using TypeScript, ensure 'aurelia-bootstrapper' is resolved via module aliases or include it in entry directly.","severity":"gotcha","affected_versions":">=5.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install aurelia-bootstrapper' and ensure entry is 'aurelia-bootstrapper'.","cause":"Missing or incorrect entry point name; aurelia-bootstrapper not installed or not in node_modules.","error":"Module not found: Error: Can't resolve 'aurelia-bootstrapper'"},{"fix":"Use aurelia-webpack-plugin v4 for webpack 4, or upgrade to webpack 5.","cause":"Incompatible webpack version (e.g., using webpack 4 with plugin v5).","error":"TypeError: Cannot read property 'tapAsync' of undefined"},{"fix":"Use const { AureliaPlugin } = require('aurelia-webpack-plugin') or import { AureliaPlugin } from 'aurelia-webpack-plugin'.","cause":"Importing the module incorrectly, likely using default import instead of named.","error":"The 'AureliaPlugin' is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}