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
You can also customize the features supported in tempaltes using the [`templateBuble` option](../options.md#templatebuble).
49
+
48
50
### Transpiling Normal `.js` Files
49
51
50
52
Since `vue-loader` only processes `*.vue` files, you'd need to tell Webpack to process normal `*.js` files with `babel-loader` or `buble-loader` in the Webpack config file. The project scaffolded with `vue-cli` already does it for you.
Copy file name to clipboardExpand all lines: docs/en/options.md
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -126,3 +126,48 @@ module.exports = {
126
126
}
127
127
}
128
128
```
129
+
130
+
### templateBuble
131
+
132
+
- type: `Object`
133
+
- default:
134
+
```js
135
+
{
136
+
target: { chrome:52 },
137
+
transforms: {
138
+
stripWith:true, // vue only
139
+
computedProperty:true,
140
+
conciseMethodProperty:true,
141
+
templateString:true
142
+
}
143
+
}
144
+
```
145
+
146
+
Configure options for a [Buble](https://buble.surge.sh/) transpile pass applied to raw render functions. The purpose of this additional pass is to:
147
+
148
+
1. add selective support to a few ES2015 features that are handy in template expressions (whitelisted in default transforms);
149
+
150
+
2. remove the `with` block inside render functions to make it strict-mode compliant and a bit more performant. This is enabled by the custom `stripWith` transform, and applied only at build time so that the base template compiler can be extremely small and lightweight.
151
+
152
+
With this option you can turn on additional [transforms](https://buble.surge.sh/guide/#supported-features) (e.g. arrow functions) or turn off `with` removal based on your specific needs. Example config with Webpack 2:
0 commit comments