Skip to content

Commit dafc508

Browse files
committed
actually fix #137
1 parent 35f837f commit dafc508

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/loader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ module.exports = function (content) {
197197
output +=
198198
'module.exports = __vue_script__ || {}\n' +
199199
'if (module.exports.__esModule) module.exports = module.exports.default\n' +
200-
'if (__vue_template__) { (typeof module.exports === "function" ? (module.exports.options || {}) : module.exports).template = __vue_template__ }\n'
200+
'if (__vue_template__) {\n' +
201+
'(typeof module.exports === "function" ' +
202+
'? (module.exports.options || (module.exports.options = {})) ' +
203+
': module.exports).template = __vue_template__\n' +
204+
'}\n'
201205
// hot reload
202206
if (
203207
process.env.NODE_ENV !== 'production' &&

0 commit comments

Comments
 (0)