Registry / http-networking / liferay-npm-bundler-plugin-resolve-linked-dependencies

liferay-npm-bundler-plugin-resolve-linked-dependencies

JSON →
library2.32.2jsnpmunverified

The `liferay-npm-bundler-plugin-resolve-linked-dependencies` package serves as a critical plugin for the `liferay-npm-bundler`. Its core function is to identify and replace `file://` protocol-based linked dependencies within a project's `node_modules` with their actual semantic version numbers during the bundling process. This capability is essential for Liferay frontend development workflows, especially in scenarios involving monorepos or local development where packages are linked rather than installed from a remote registry. By doing so, it ensures that the final bundled output accurately reflects concrete package versions, preventing potential issues arising from local file paths in production builds. The current stable version, 2.32.2, reflects ongoing development within the broader `liferay-frontend-projects` monorepo. Its release cadence is closely tied to updates in the Liferay Portal and its frontend tooling ecosystem, which frequently incorporates new features and bug fixes. The plugin differentiates itself by specifically addressing the unique challenges of dependency linking and resolution inherent in the Liferay build environment, providing a robust solution for maintaining consistent dependency references.

npm install liferay-npm-bundler-plugin-resolve-linked-dependencies
INSTALL
IMPORT
SIG · LIFERAY-NPM-BUNDLE
L
liferay-npm-bundler-plugin-resolve-linked-dependencies
http-networkingjavascriptv2.32.2
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.

resolve-linked-dependencies (in .npmbundlerrc)
{ "*": { "plugins": ["resolve-linked-dependencies"] } }
import { resolveLinkedDependencies } from 'liferay-npm-bundler-plugin-resolve-linked-dependencies';
This plugin is activated by its string identifier within the `plugins` array of the `.npmbundlerrc` configuration file. It is not imported as a JavaScript module in application code or directly invoked.

This quickstart demonstrates how to install the plugin and configure `liferay-npm-bundler` via the `.npmbundlerrc` file to enable linked dependency resolution during the build process.

// First, install the plugin as a development dependency: // npm install --save-dev liferay-npm-bundler-plugin-resolve-linked-dependencies // Then, configure your .npmbundlerrc file to include the plugin: // This JSON object represents the content of a typical .npmbundlerrc file. const npmBundlerConfig = { "*": { // Apply this configuration to all modules "plugins": [ "resolve-linked-dependencies" // Enable the linked dependencies resolver plugin // You can add other Liferay NPM Bundler plugins here ], "externs": { // Example of other common bundler options "jquery": "$", "lodash": "_" } } }; // In a Liferay project, the bundler would typically be executed // via an npm script, e.g., 'npm run build:bundle' which calls 'liferay-npm-bundler'. // The plugin will automatically run as part of the bundling process. console.log("Example .npmbundlerrc configuration:\n", JSON.stringify(npmBundlerConfig, null, 2));
Debug
Known issues
gotchaThis plugin's functionality is tightly coupled with `liferay-npm-bundler`. Significant changes to the bundler's core API or configuration format in new major versions may indirectly cause breaking behavior or require updates to this plugin's integration.
fix
Always consult the `liferay-npm-bundler` changelog and documentation when upgrading Liferay frontend tooling. Verify compatibility and update your `.npmbundlerrc` configuration or plugin version as needed.
affects: >=1.0
gotchaThis plugin specifically targets dependencies linked using `file://` protocols in `package.json` or those created via `npm link`. It does not affect standard dependencies installed from npm registries (e.g., `npm install`).
fix
Ensure your local development environment utilizes `file://` references or `npm link` for packages you intend this plugin to resolve. Confirm the presence of these linked dependencies within your `node_modules` directory.
affects: >=1.0
Errors
Common errors & fixes
Error: Cannot find plugin 'resolve-linked-dependencies'
The plugin package is either not installed, misspelled in the configuration, or not discoverable by `liferay-npm-bundler`.
fix
Verify that `liferay-npm-bundler-plugin-resolve-linked-dependencies` is listed in your `package.json`'s `devDependencies` and is installed (run `npm install`). Check the spelling of the plugin name in your `.npmbundlerrc` file.
Bundled module still contains 'file://' paths for linked dependencies
The plugin might not be correctly configured in `.npmbundlerrc`, or the dependency in question is not being recognized as a linked dependency that requires resolution by the plugin.
fix
Confirm that `resolve-linked-dependencies` is correctly listed in the `plugins` array of your `.npmbundlerrc` file. Inspect your `node_modules` to ensure the dependency is indeed a `file://` link or an `npm link`. Check for any conflicting bundler configurations that might override plugin behavior.
Upgrade
Version history
2.32.2latest on npm
Audit
Dependencies
liferay-npm-bundlerrequiredThis package is a plugin designed to extend the functionality of `liferay-npm-bundler`. It is a required peer dependency for the plugin to operate.
Agent activity
2 hits · last 30 days
node
2
Resources
liferay-npm-bundler-plugin-resolve-linked-dependencies — npm install liferay-npm-bundler-plugin-resolve-linked-dependencies · libregistry