A Dawn middleware that wraps Webpack 5 for building web applications, part of the Dawn toolkit by Alibaba. Version 1.1.36 (stable, last published 2022) provides full Webpack 5 support including Module Federation, Fast Refresh, ESBuild minification, and smart defaults for entry, output, and TypeScript compilation. Designed specifically for the Dawn pipeline (pipe.yml) workflow, it simplifies configuration by auto-detecting project structure. Compared to standalone Webpack usage, this middleware integrates with Dawn's task runner, server, and browser-sync plugins. Release cadence is low; maintained by Alibaba team. Requires Node.js >=10.13.
npm install dn-middleware-webpack5No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup of webpack5 middleware in Dawn pipeline config files for development with hot reload and production build.
Set compress: false in webpack5 config when using another compress middleware.
Use devtool option instead of sourceMap.
Set compress: false and then configure terser or esbuild.minify as needed.
Ensure moduleFederation is an object with valid Webpack ModuleFederationPlugin options.
npm uninstall dn-middleware-webpack -D && npm install dn-middleware-webpack5 -D, then change pipe.yml middleware name from 'webpack' to 'webpack5'.
Run 'npm install webpack --save-dev' to install webpack as a dev dependency.
Check the webpack5 configuration in pipe.yml for typos or wrong types. Refer to the documentation for valid options.
Set entry explicitly in pipe.yml to the correct path, e.g., entry: src/index.tsx
Install '@dawnjs/dn-middleware-babel' as a dev dependency.