Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored and Andarist committed Dec 17, 2019
1 parent 39a63ec commit b54b0d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/rollup-plugin-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ All options are as per the [Babel documentation](https://babeljs.io/), except `o

Babel will respect `.babelrc` files – this is generally the best place to put your configuration.

### External dependencies

Ideally, you should only be transforming your own source code, rather than running all of your external dependencies through Babel – hence the `exclude: 'node_modules/**'` in the example above. If you have a dependency that exposes untranspiled ES6 source code that doesn't run in your target environment, then you may need to break this rule, but it often causes problems with unusual `.babelrc` files or mismatched versions of Babel.

We encourage library authors not to distribute code that uses untranspiled ES6 features (other than modules) for this reason. Consumers of your library should *not* have to transpile your ES6 code, any more than they should have to transpile your CoffeeScript, ClojureScript or TypeScript.

Use `babelrc: false` to prevent Babel from using local (i.e. to your external dependencies) `.babelrc` files, relying instead on the configuration you pass in.


## Configuring Babel

Expand Down

0 comments on commit b54b0d1

Please sign in to comment.