Registry / devops / liferay-npm-bundler-plugin-inject-angular-dependencies

liferay-npm-bundler-plugin-inject-angular-dependencies

JSON →
library1.8.0jsnpmunverified

The `liferay-npm-bundler-plugin-inject-angular-dependencies` package is a specialized plugin for `liferay-npm-bundler` designed to address the challenges of deploying Angular applications within Liferay Portal's npm architecture. Its primary function is to automatically inject necessary peer dependencies (such as `rxjs` for `@angular/forms`) that the Liferay NPM Bundler may not correctly resolve or bundle by default. This ensures Angular packages function correctly at runtime, preventing 'module not found' errors. As of version 1.8.0, it remains critical for bridging the gap until `liferay-npm-bundler` offers full, native `peerDependency` support. The plugin determines the correct dependency versions by scanning the output `node_modules` directory. Its release cadence is typically tied to updates and maintenance within the broader Liferay ecosystem, focusing on compatibility and stability for Angular projects in Liferay Portal.

npm install liferay-npm-bundler-plugin-inject-angular-dependencies
INSTALL
IMPORT
SIG · LIFERAY-NPM-BUNDLE
L
liferay-npm-bundler-plugin-inject-angular-dependencies
devopsjavascriptv1.8.0
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.

inject-angular-dependencies
{ "*": { "plugins": ["inject-angular-dependencies"] } }
import { InjectAngularDependencies } from 'liferay-npm-bundler-plugin-inject-angular-dependencies';
This plugin is configured as a string identifier within the `.npmbundlerrc` file's `plugins` array, not directly imported into JavaScript or TypeScript application code.

This `.npmbundlerrc` snippet globally enables the `inject-angular-dependencies` plugin without any custom options, applying it to all bundles.

{ "*": { "plugins": ["inject-angular-dependencies"] } }
Debug
Known issues
gotchaThe `dependenciesMap` option is explicitly noted as a temporary workaround. Its use is discouraged except to bypass specific, unaddressed errors, and its behavior or availability may change in future versions.
fix
Avoid using `dependenciesMap` unless absolutely necessary. Monitor Liferay-NPM-Bundler updates for permanent solutions to dependency issues.
affects: >=1.0.0
breakingThis plugin mitigates the `liferay-npm-bundler`'s incomplete `peerDependency` support. If `liferay-npm-bundler` introduces full native `peerDependency` handling, this plugin may become obsolete or require significant breaking changes, rendering its current usage incorrect.
fix
Regularly check `liferay-npm-bundler` release notes for enhancements in `peerDependency` resolution and be prepared to update or remove this plugin.
affects: >=1.0.0
gotchaImproper configuration of this plugin, or conflicts with other bundling configurations, can lead to unintended dependency injection, duplicate modules, or unexpected runtime behavior in Angular applications.
fix
Thoroughly test your bundled Angular applications and inspect the dependency tree to ensure the plugin is resolving dependencies as expected without introducing conflicts.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'rxjs' or similar 'module not found' errors at runtime for Angular peer dependencies.
The Liferay NPM Bundler fails to correctly identify and bundle peer dependencies required by Angular modules (e.g., `@angular/forms` requires `rxjs`).
fix
Add `"inject-angular-dependencies"` to the `plugins` array in your `.npmbundlerrc` file to ensure these dependencies are forcibly injected.
Zone.js has detected that ZoneAwarePromise is overwritten.
Multiple instances or incorrect versions of core Angular/Zone.js dependencies are being bundled, often due to improper peer dependency resolution or conflicting bundling configurations.
fix
Ensure `liferay-npm-bundler-plugin-inject-angular-dependencies` is correctly configured and that no other bundling plugins or manual configurations are causing duplicate or conflicting injections of core Angular libraries.
Upgrade
Version history
1.8.0latest on npm
Audit
Dependencies
liferay-npm-bundlerrequiredThis plugin extends the functionality of the Liferay NPM Bundler and requires it to operate.
Agent activity
2 hits · last 30 days
node
2
Resources
liferay-npm-bundler-plugin-inject-angular-dependencies — npm install liferay-npm-bundler-plugin-inject-angular-dependencies · libregistry