-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
bundle rendering doesn't work if exports a function using module.exports = function(context)..
instead of export default context => ...
in server entry point . it throws an error:
TypeError: Cannot read property 'render' of undefined
at normalizeRender (node_modules\vue-server-renderer\build.js:5192:19)
it looks like a compatibility problem of bundle rendering with ES5.
I changed the codes in node_modules/vue-server-renderer/build.js to the following:
if(typeof m.exports === 'function'){
resolve(m.exports(_context))
return
}
var res = Object.prototype.hasOwnProperty.call(m.exports, 'default')
? m.exports.default
: m
then it works.
Metadata
Metadata
Assignees
Labels
No labels