Where is the location of .babelrc file?

.babelrc is never auto created. You must go to the root directory of your project. Create a file – touch .babelrc, open the file and enter the babel settings here, then save. If you are following https://babeljs.io/blog/2015/10/31/setting-up-babel-6, Setting up Babel 6 and installed all the plugins and presets as stated, this may help. { “presets”: … Read more

Why do I need Babel JS?

While the answers here are all correct, Babel is not just about ES6 (ES2015). The ECMA standards committee has agreed to release yearly updates to the JavaScript language. Babel will always integrate the standards, whereas we don’t know if all the browsers will, and if they do, whether they will be able to keep up … Read more

babel vs babel-core vs babel-runtime

babel-core is the API. For v5 the babel package is the CLI and depends on babel-core. For v6, the babel-cli package is the CLI (the CLI bin command is still babel though) and the babel package doesn’t do anything. babel-runtime I guess is just the runtime (polyfill and helpers) to support code that’s already been … Read more

babel CLI copy nonjs files

Babel has the copy files option for this: babel src –out-dir lib –copy-files Note: It is true that babels primary purpose is to process javascript files, but babel’s big suite of tools these day often makes it unnecessary to go for more complex build script setups as gulp and alike. A gulp-less setup could be … Read more

tech