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

Commit 929837d

Browse files
committed
update readme
1 parent 87515a3 commit 929837d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,17 @@ The default Babel (6) options used for Vue.js components are:
127127
}
128128
```
129129

130-
If you wish to override this, you can add a `vue.config.js` and configure the option for `babel`:
130+
If you wish to override this, you can add a `.babelrc` file at the root of your project:
131131

132-
``` js
133-
// vue.config.js
134-
module.exports = {
135-
babel: {
136-
// enable stage 0 transforms.
137-
// make sure to install babel-presets-stage-0
138-
presets: ['es2015', 'stage-0'],
139-
plugins: ['transform-runtime']
140-
}
132+
``` json
133+
{
134+
"presets": ["es2015", "stage-2"],
135+
"plugins": ["transform-runtime"]
141136
}
142137
```
143138

139+
You can also configure babel with the `babel` field in `vue.config.js`, which will take the highest priority.
140+
144141
## Enabling Pre-Processors
145142

146143
You need to install the corresponding node modules to enable the compilation. e.g. to get stylus compiled in your Vue components, do `npm install stylus --save-dev`.

0 commit comments

Comments
 (0)