The `liferay-npm-bundler-preset-angular-cli` package is a specialized configuration preset designed to facilitate the integration of projects created with the Angular CLI into the Liferay DXP and Liferay Portal CE environments. It serves as an extension for `liferay-npm-bundler`, streamlining the process of packaging Angular applications into OSGi-compliant modules that can be deployed as Liferay portlets. This preset addresses the unique challenges of Angular's bootstrapping mechanism within a portal context, ensuring proper module resolution and execution. The current stable version is `2.32.2`. While direct changelog updates for this specific package are not provided in the recent releases excerpt, it belongs to the actively maintained `liferay-frontend-projects` monorepo, implying ongoing development and compatibility updates. Its core value lies in offering a pre-configured solution that enables Angular developers to leverage their familiar toolchain while adhering to Liferay's frontend development best practices, simplifying what would otherwise be a complex manual configuration process for module federation.
npm install liferay-npm-bundler-preset-angular-cliVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install the preset and configure your `.npmbundlerrc` and `package.json` to enable `liferay-npm-bundler` to correctly process and deploy an Angular CLI project as a Liferay portlet.
Review official Liferay documentation for migration guides from `liferay-npm-bundler` to modern frontend tooling, particularly for Angular projects, as this preset will become obsolete.
Ensure that your Liferay portlet configuration for Angular applications is set to non-instanceable. Avoid attempting to deploy multiple instances of the same Angular portlet on a single Liferay page.
Design your Liferay pages to host only a single Angular CLI-adapted portlet per page to prevent bootstrapping conflicts and ensure stable application execution.
Ensure only one Angular CLI-adapted portlet is present on any given Liferay page, and verify that the portlet is configured as non-instanceable in Liferay.
Confirm that only a single Angular CLI-adapted portlet is placed on the Liferay page. Verify bundler configuration to ensure `zone.js` is not duplicated or globally exposed in a conflicting manner, though the preset aims to handle this.