The `liferay-npm-bundler-preset-vue` package provides a specialized configuration preset for the `liferay-npm-bundler`, specifically tailored for Vue.js projects integrated within the Liferay DXP ecosystem. Currently at version 1.8.0, this package is typically released as part of the broader `liferay-npm-build-tools` suite, aligning its updates with Liferay DXP's release cycle rather than an independent cadence. Its core function is to streamline the build process for Vue.js applications by including pre-configured Babel presets, such as `babel-preset-liferay-standard`, and essential Liferay NPM Bundler plugins like `liferay-npm-bundler-plugin-replace-browser-modules`. This ensures proper transpilation, module resolution, and compatibility with Liferay's runtime environment, differentiating it from general-purpose Vue build tools by offering Liferay-specific optimizations and required polyfills for portlet and widget development.
npm install liferay-npm-bundler-preset-vueNo compatibility data collected yet for this library.
This demonstrates how to enable the Vue.js preset within your `.npmbundlerrc` configuration file for the Liferay NPM Bundler.
Consult Liferay's official documentation for `liferay-npm-build-tools` and `liferay-npm-bundler` for compatibility matrices and migration guides when upgrading Liferay DXP or build tools versions.
Ensure your project is a Liferay DXP portlet or widget and is configured to use `liferay-npm-bundler` correctly. For non-Liferay projects, use standard Vue CLI or Vite configurations.
Review your project's Babel configuration. Prioritize using the Liferay presets and only add custom configurations for specific, non-conflicting transformations. Test build outputs thoroughly.
Run `npm install --save-dev liferay-npm-bundler-preset-vue` or `yarn add -D liferay-npm-bundler-preset-vue` to install the package. Double-check the spelling in your `.npmbundlerrc` file.
Verify that `liferay-npm-bundler-preset-vue` is correctly loaded in `.npmbundlerrc`. Ensure there are no conflicting Babel configurations that might disable or override the Liferay standard preset. Upgrade to the latest compatible versions of Liferay build tools.