Answer the question
In order to leave comments, you need to log in
Why doesn't babel-cli translate es-2015 - es-2018 to es5?
Hello, the project has a task to rewrite small libraries from ES5 to ES-2015/18. I would like to do this with some kind of console commands (to automate the publishing process), but the launch npx babel ./path/to/file.js
does not lead to anything, more precisely, it does, but I still see and .
I understand that the question is very simple for many, but on my way I bypassed node.js, unfortunately. And time is running out, so I'm asking a question here. class { /* что-то там */ }
() => {}
Answer the question
In order to leave comments, you need to log in
Rollup build https://medium.com/@kelin2025/so-you-wanna-use-es6...
Use "prepare" in scripts to run build from src to lib for example.
{
"name": "you-library",
"scripts": {
"prepare": "babel src -d lib"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question