This package, `piral-cli-webpack5`, is a crucial plugin for the `piral-cli` toolchain, enabling developers to use Webpack version 5 for both debugging and production builds of micro-frontend applications (pilets) and their host applications (Piral instances). It provides the underlying bundling logic when `webpack5` is selected as the bundler within the Piral ecosystem. The package is currently at version 1.10.3 and is actively maintained, receiving frequent updates primarily focused on dependency upgrades, bug fixes, and compatibility improvements with newer versions of underlying frameworks like Angular. Releases appear to follow a regular cadence aligned with the broader Piral project, often weekly or bi-weekly for patch releases. Its key differentiator is its tight integration with the Piral CLI, abstracting away much of the complex Webpack 5 configuration needed for micro-frontends, allowing developers to focus on application logic rather than bundler specifics. It requires Node.js version 18.17 or higher.
npm install piral-cli-webpack5Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the `piral-cli-webpack5` plugin implicitly through `piral-cli` commands for debugging and building pilets and Piral instances.
Upgrade your Node.js environment to version 18.17 or higher. Use a version manager like `nvm` to easily switch Node.js versions: `nvm install 18 && nvm use 18`.
Ensure you are using `piral-cli-webpack5` version 1.8.5 or newer to benefit from fixes in TypeScript declaration generation. Update your package: `npm update piral-cli-webpack5`.
Always use the designated `piral-cli-webpack5` plugin for Webpack 5 based projects. If other Webpack versions are needed, use the corresponding Piral CLI bundler plugin (e.g., `piral-cli-webpack4`) or implement a custom bundler.
Install `webpack` and `webpack-cli` as development dependencies in your project: `npm install --save-dev webpack webpack-cli`.
Update your Node.js environment to version 18.17 or higher. You can use tools like `nvm` (Node Version Manager) for this: `nvm install 18 && nvm use 18`.
First, ensure all project dependencies are correctly installed (`npm install`). Check your `pilet.json` or `piral.json` for any custom Webpack configurations that might be conflicting. For complex issues, try isolating the problem in a minimal reproduction or consulting the Piral documentation for advanced Webpack customization.