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

@@ -26,7 +26,7 @@ export interface HMRRuntime {
// it easier to be used in toolings like vue-loader
// Note: for a component to be eligible for HMR it also needs the __hmrId option
// to be set so that its instances can be registered / removed.
if (__DEV__ && (__BROWSER__ || __TEST__)) {
if (__DEV__) {
const globalObject: any =
typeof global !== 'undefined'
? global