liferay-npm-bundler-improved is an unofficial, high-speed alternative to the official liferay-npm-bundler, designed to accelerate the development of Liferay portlets. Currently stable at version 1.5.1, its release cadence is feature-driven, with significant updates recently including beta phases for watch mode and localization. Key differentiators include drastically faster build times (around 0.1s on modern hardware) compared to the official bundler, an enhanced developer experience through a 'watch mode' with live instance replacement (primarily for Vite projects), comprehensive error reporting for common issues like missing `package.json` keys, and experimental localization support for `Liferay.Language.get()` functions within portlets. It also offers optional deployment automation and support for portlet instance configuration.
npm install liferay-npm-bundler-improvedVerified import paths — ran on the pinned version, not inferred.
Demonstrates `liferay-npm-bundler-improved` setup in `package.json` scripts, including development with watch/deploy mode and a production build incorporating source and asset copying. Requires Vite for watch mode.
Remove `lnbs-copy-sources` and `lnbs-copy-assets` from your build scripts and instead add `--copy-sources` and `--copy-assets` directly to your `liferay-npm-bundler-improved` command.
Ensure your project utilizes `vite` for bundling if you intend to use the watch mode. Consider bundle size for optimal watch mode performance.
Define the `LIFERAY_DEPLOYMENT_PATH` environment variable in your shell or a `.env` file, pointing to your Liferay server's deployment directory, before running the deploy command.
Be aware of these limitations. For dynamic or global localization, manual approaches or alternative Liferay-native localization methods may still be necessary.
Developers requiring these specific features may need to maintain manual solutions or consider the official Liferay NPM Bundler for full compatibility, understanding the performance trade-offs.
Verify that your `package.json` contains all necessary fields and that they are correctly formatted according to npm standards.
Ensure that the entry file specified in your `package.json` (or the default expected path) exists and is accessible.
Set the `LIFERAY_DEPLOYMENT_PATH` environment variable to the absolute path of your Liferay server's deployment folder (e.g., `LIFERAY_DEPLOYMENT_PATH=/opt/liferay/deploy`) before running the build command with deployment enabled.
No dependency data recorded yet.