You should use the latest 2.x version of the liferay-npm-bundler. It offers more stability and includes more features out-of-the-box. If you already created a project using the 1.x version, don’t worry. Follow these steps to migrate your project to 2.x:
-
Update the
liferay-npm-bundler
dependency in yourpackage.json
to version 2.x:{ "devDependencies": { ... "liferay-npm-bundler": "^2.0.0", ... }, ... }
-
Remove all
liferay-npm-bundler-preset-*
dependencies from yourpackage.json
because liferay-npm-bundler 2.x includes these by default. -
Remove any bundler presets you configured in your
.npmbundlerrc
file. liferay-npm-bundler 2.x includes one smart preset that handles all frameworks automatically.
These are the standard requirements that all projects have in common. The remaining steps depend on your project’s framework. Follow the instructions in the corresponding section to finish migrating your project.