Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit cda6cb2

Browse files
committed
docs: add info about .babelrc, fixes #510
1 parent fc04d29 commit cda6cb2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ For example, you can transpile [stage 1 properties](https://github.com/jeffmo/es
142142
Invoke Babel to transpile files. Useful with ES6 target. Please see `useCache` option
143143
which can improve warm-up time.
144144

145+
If you're using `babelOptions`, anything in `.babelrc` will take precedence. This breaks expected usage for scenarios where you need two sets of Babel configs (example: one for Webpack, one for your build tools).
146+
147+
You may want to `"babelrc": false to disable `.babelrc` if you don't want it:
148+
149+
```json
150+
{
151+
"useBabel": true,
152+
"babelOptions": {
153+
"babelrc": false, /* Important line */
154+
"presets": [
155+
["env", { "targets": "last 2 versions, ie 11", "modules": false }]
156+
]
157+
}
158+
}
159+
```
160+
145161
### babelCore *(string) (default=undefined)*
146162

147163
Override the path used to find `babel-core`. Useful if `node_modules` is installed in a non-standard place or webpack is being invoked from a directory not at the root of the project.

0 commit comments

Comments
 (0)