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

@@ -4,7 +4,8 @@ import { ComponentInternalInstance, ComponentOptions } from './component'
import { ComponentPublicInstance } from './componentPublicInstance'
export function initCustomFormatter() {
if (!__DEV__ || !__BROWSER__) {
/* eslint-disable no-restricted-globals */
if (!__DEV__ || typeof window === 'undefined') {
return
}
@@ -189,7 +190,6 @@ export function initCustomFormatter() {
return `Ref`
}
/* eslint-disable no-restricted-globals */
if ((window as any).devtoolsFormatters) {
;(window as any).devtoolsFormatters.push(formatter)
} else {