From c0acec59cfc331d253e0ce4baaebe566b49053d7 Mon Sep 17 00:00:00 2001 From: karevn Date: Mon, 18 Jan 2016 22:15:37 +0500 Subject: [PATCH] Fixed error when vue module exports a function --- lib/loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/loader.js b/lib/loader.js index 805650a48..7e74adcb1 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -194,6 +194,7 @@ module.exports = function (content) { // attach template output += 'module.exports = __vue_script__ || {}\n' + + 'module.exports.options = module.exports.options || {}\n' + 'if (module.exports.__esModule) module.exports = module.exports.default\n' + 'if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ }\n' // hot reload