Skip to content

Commit b95761e

Browse files
bopjesvlayyx990803
authored andcommitted
Enable passing an object to the template engine (#226)
1 parent ba4e0bb commit b95761e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/template-loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ module.exports = function (content) {
66
this.cacheable && this.cacheable()
77
var callback = this.async()
88
var opt = loaderUtils.parseQuery(this.query)
9+
var vue = this.options.vue
10+
if (vue && vue.template) {
11+
for (var key in vue.template) {
12+
opt[key] = vue.template[key]
13+
}
14+
}
915

1016
function exportContent (content) {
1117
if (opt.raw) {

0 commit comments

Comments
 (0)