You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,20 +127,17 @@ The default Babel (6) options used for Vue.js components are:
127
127
}
128
128
```
129
129
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:
131
131
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"]
141
136
}
142
137
```
143
138
139
+
You can also configure babel with the `babel` field in `vue.config.js`, which will take the highest priority.
140
+
144
141
## Enabling Pre-Processors
145
142
146
143
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