-1

I have a problem with Babel CLI. It copies my JS-files without conversion from JS6 to JS5. Here is my small "Hello World" project code sources for demonstrate of this problem.

In the scripts section of the project.json file I added the row:

"babel": "babel src/js -d test/lib"

I launch it by the command:

npm run babel

Why does it happen?

Thank you.

Andrey Bushman
  • 10,992
  • 14
  • 77
  • 163

1 Answers1

0

I managed to find the answer myself. I publish it here so that newcomers such as myself do not stumble on the same rake.

It is necessary to install babel-preset-es2015 and add the .babelrc file. Now it works.

Andrey Bushman
  • 10,992
  • 14
  • 77
  • 163