The `liferay-npm-bundler-preset-vue-cli` package, currently at version 2.32.2, provides a configuration preset for the `liferay-npm-bundler`. Its primary purpose is to enable projects created with Vue CLI to be correctly bundled and deployed within Liferay DXP or Liferay Portal CE environments. This preset automates the necessary build configurations, adapting Vue CLI's output to Liferay's module loading and deployment mechanisms. While this package received updates in conjunction with the broader Liferay frontend projects, the underlying `liferay-npm-bundler` has been officially deprecated as of Liferay 2024.Q4/Portal GA129 and is slated for future removal. This signifies a shift in Liferay's frontend development strategy towards more standard JavaScript tooling like `esbuild`, `webpack`, or `vite`. Consequently, this preset is no longer actively supported for new development and existing projects should plan for migration away from the `liferay-npm-bundler` ecosystem.
npm install liferay-npm-bundler-preset-vue-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install the preset and configure the `.npmbundlerrc` file to enable the preset for a Vue CLI project intended for Liferay DXP/Portal.
Projects should plan to migrate away from the `liferay-npm-bundler` ecosystem to standard JavaScript tooling like `esbuild`, `webpack`, or `vite`. Consult Liferay's official documentation for migration guides.
Workarounds involved transpiling modules to CommonJS before the bundler runs, or using Babel's `babel-loader` plugin within the bundler config. However, the recommended fix is to migrate to a standard bundler.
Be aware of this internal package resolution mechanism. There's no direct 'fix' other than understanding the bundler's internal workings or, ideally, migrating to a standard bundler.
Ensure `liferay-npm-bundler` is at version `2.32.1` or later to avoid the known `globby` issue. For future stability, migrating to a standard bundler is recommended.
This issue is a known limitation of `liferay-npm-bundler` v2. Consider configuring Babel to transpile `node_modules` dependencies to CommonJS before the bundler runs, or, more robustly, migrate your project to a standard bundler like Webpack or esbuild.
Pin the `liferay-npm-bundler` dependency to a specific working version in your `package.json` (e.g., `"liferay-npm-bundler": "2.32.2"`). If already using a pinned version, try clearing `node_modules` and `package-lock.json` and reinstalling. If the issue persists, refer to Liferay's official support channels for specific breaking changes or migrate to standard tooling.
Verify that your Vue CLI project, Node.js version, and Liferay DXP/Portal version are compatible with the `liferay-npm-bundler` and this preset. Review the `.npmbundlerrc` configuration to ensure it's correctly applied. Check Liferay's official documentation and community forums for known compatibility issues or migration advice, especially given the bundler's deprecation.