From c8e3177b5ba7dd8c2b68ed522add320596d34a53 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 15 May 2016 21:16:51 +0200 Subject: [PATCH] Enable passing an object to the template engine --- lib/template-loader.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/template-loader.js b/lib/template-loader.js index 575ea0c5b..af3d6e083 100644 --- a/lib/template-loader.js +++ b/lib/template-loader.js @@ -6,6 +6,12 @@ module.exports = function (content) { this.cacheable && this.cacheable() var callback = this.async() var opt = loaderUtils.parseQuery(this.query) + var vue = this.options.vue + if (vue && vue.template) { + for (var key in vue.template) { + opt[key] = vue.template[key] + } + } function exportContent (content) { if (opt.raw) {