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-dependenciesVerified import paths — ran on the pinned version, not inferred.
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.
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.
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.
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.
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.