After following the steps covered in the intro to this section, follow these remaining steps to migrate your Angular project to 2.x. While liferay-npm-bundler 1.x relied on Babel to perform some transformation steps, these transformations are now automatically applied in version 2.x. Therefore, you should remove Babel from your project:
-
Open your
tsconfig.json
file and replace the"module": "amd"
compiler option with the configuration shown below to produce CommonJS modules:{ "compilerOptions": { ... "module": "commonjs", ... } }
-
Delete the
.babelrc
file to remove the Babel configuration. -
Remove Babel from your
package.json
build process so it matches the configuration below:{ "scripts": { "build": "tsc && liferay-npm-bundler" }, ... }
-
Remove the following Babel dependencies from your
package.json
devDependencies:"babel-cli": "6.26.0", "babel-preset-liferay-amd": "1.2.2"
Great! Your project is migrated to use the new version of the liferay-npm-bundler.