Migrating a Plain JavaScript, Billboard JS, JQuery, Metal JS, React, or Vue JS Project to Use Bundler 2.x

After following the steps covered in the intro to this section, follow these remaining steps to migrate the framework projects shown below to 2.x:

  • plain JS 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:

  1. Remove the liferay-project preset from your project’s .babelrc file. All that should remain is the es2015 preset shown below:

    {
      "presets": ["es2015"]
    }
    

    If your project uses React, make sure the react preset remains as well:

    {
      "presets": ["es2015", "react"]
    }
    
  2. Remove the babel-preset-liferay-project dependency from your package.json.

Awesome! Your project is migrated to use the new version of the liferay-npm-bundler.

« Migrating a liferay-npm-bundler Project from 1.x to 2.xMigrating an Angular Project to Use Bundler 2.x »
Was this article helpful?
0 out of 0 found this helpful