Browse Source

fix ssr bundle renderer error on commonjs exports (fix #3867)

dev
Evan You 8 years ago
parent
commit
addb461e3c
  1. 2
      src/server/run-in-vm.js

2
src/server/run-in-vm.js

@ -30,7 +30,7 @@ export default function runInVm (code, _context = {}) {
compiledWrapper.call(m.exports, m.exports, require, m)
const res = Object.prototype.hasOwnProperty.call(m.exports, 'default')
? m.exports.default
: m
: m.exports
resolve(typeof res === 'function' ? res(_context) : res)
})
}

Loading…
Cancel
Save