Преглед изворни кода

fix(build): avoid accessing __FEATURE_PROD_DEVTOOLS__ flag in root scope

Evan You пре 2 година
родитељ
комит
dfd9654665
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      packages/runtime-core/src/index.ts

+ 3 - 3
packages/runtime-core/src/index.ts

@@ -161,13 +161,13 @@ import {
 } from './devtools'
 } from './devtools'
 
 
 export const devtools = (
 export const devtools = (
-  __DEV__ || __FEATURE_PROD_DEVTOOLS__ ? _devtools : undefined
+  __DEV__ || __ESM_BUNDLER__ ? _devtools : undefined
 ) as DevtoolsHook
 ) as DevtoolsHook
 export const setDevtoolsHook = (
 export const setDevtoolsHook = (
-  __DEV__ || __FEATURE_PROD_DEVTOOLS__ ? _setDevtoolsHook : NOOP
+  __DEV__ || __ESM_BUNDLER__ ? _setDevtoolsHook : NOOP
 ) as typeof _setDevtoolsHook
 ) as typeof _setDevtoolsHook
 
 
-// Types -------------------------------------------------------------------------
+// Types -----------------------------------------------------------------------
 
 
 import type { VNode } from './vnode'
 import type { VNode } from './vnode'
 import type { ComponentInternalInstance } from './component'
 import type { ComponentInternalInstance } from './component'