Migrating a liferay-npm-bundler Project from 1.x to 2.x

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:

  1. Update the liferay-npm-bundler dependency in your package.json to version 2.x:

    {
      "devDependencies": {
        ...
        "liferay-npm-bundler": "^2.0.0",
        ...
      },
      ...
    }
    
  2. Remove all liferay-npm-bundler-preset-* dependencies from your package.json because liferay-npm-bundler 2.x includes these by default.

  3. 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.

« Formatting Your npm Modules for AMDMigrating a Plain JavaScript, Billboard JS, JQuery, Metal JS, React, or Vue JS Project to Use Bundler 2.x »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0