Migrating a Plain JavaScript, Billboard JS, JQuery, Metal JS, React, or Vue JS Project to Use Liferay npm Bundler 2.x
The Liferay npm bundler is deprecated of Liferay 2024.Q4/Portal GA129, and it’s planned for future removal.
Follow these steps to migrate the framework projects shown below to use liferay-npm-bundler 2.x:
- plain JavaScript project
- Billboard.js project
- JQuery project
- Metal.js project
- React project
- Vue.js project
While Babel is required to transpile your source files, you must remove any Babel preset used for transformations from your project that bundler 1.x imposed. liferay-npm-bundler 2.x handles these transformations by default:
- 
Update the liferay-npm-bundlerdependency in yourpackage.jsonto version 2.x:{ "devDependencies": { ... "liferay-npm-bundler": "^2.0.0", ... }, ... }
- 
Remove all liferay-npm-bundler-preset-*dependencies from yourpackage.jsonbecause liferay-npm-bundler 2.x includes these by default.
- 
Remove any bundler presets you configured in your .npmbundlerrcfile. liferay-npm-bundler 2.x includes one smart preset that handles all frameworks automatically.
- 
Remove the liferay-project preset from your project’s .babelrcfile. All that should remain is thees2015preset shown below:{ "presets": ["es2015"] }If your project uses React, make sure the reactpreset remains as well:{ "presets": ["es2015", "react"] }
- 
Remove the babel-preset-liferay-projectdependency from yourpackage.json.
Awesome! Your project is migrated to use liferay-npm-bundler 2.x.