fix: allow hmr in all builds

close #2571
This commit is contained in:
Evan You
2020-11-27 10:34:45 -05:00
parent 34703082fd
commit 46d80f4d58
4 changed files with 8 additions and 13 deletions

View File

@@ -614,7 +614,7 @@ export function handleSetupResult(
) {
if (isFunction(setupResult)) {
// setup returned an inline render function
if (!__BROWSER__ && (instance.type as ComponentOptions).__ssrInlineRender) {
if (__NODE_JS__ && (instance.type as ComponentOptions).__ssrInlineRender) {
// when the function's name is `ssrRender` (compiled by SFC inline mode),
// set it as ssrRender instead.
instance.ssrRender = setupResult