Where Do You Put the Babelrc

The . babelrc file is your local configuration for your code in your project. Generally you would put it in the root of your application repo. It will affect all files that Babel processes that are in the same directory or in sibling directories of the .

How do I install Babelrc?

  1. Open a command prompt, and navigate ( cd ) to the es6-tutorial directory.
  2. Type the following command to create a package.json file: npm init. …
  3. Type the following command to install the babel-cli and babel-core modules: npm install babel-cli babel-core –save-dev.

Is Babelrc same as babel config?

Babel has two parallel config file formats which can be used together, or independently. . babelrc would be useful if you want to run certain transformations / plugins on a subset of files /directories. Maybe you have 3rd party libraries that you don’t want to be transformed/changed by babel.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest