File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ enum DevtoolsHooks {
21
21
PERFORMANCE_END = 'perf:end'
22
22
}
23
23
24
- interface DevtoolsHook {
24
+ export interface DevtoolsHook {
25
25
enabled ?: boolean
26
26
emit : ( event : string , ...payload : any [ ] ) => void
27
27
on : ( event : string , handler : Function ) => void
Original file line number Diff line number Diff line change @@ -150,7 +150,18 @@ export const ErrorTypeStrings = (
150
150
) as typeof _ErrorTypeStrings
151
151
152
152
// For devtools
153
- export { devtools , setDevtoolsHook } from './devtools'
153
+ import {
154
+ devtools as _devtools ,
155
+ setDevtoolsHook as _setDevtoolsHook ,
156
+ DevtoolsHook
157
+ } from './devtools'
158
+
159
+ export const devtools = (
160
+ __DEV__ || __FEATURE_PROD_DEVTOOLS__ ? _devtools : undefined
161
+ ) as DevtoolsHook
162
+ export const setDevtoolsHook = (
163
+ __DEV__ || __FEATURE_PROD_DEVTOOLS__ ? _setDevtoolsHook : NOOP
164
+ ) as typeof _setDevtoolsHook
154
165
155
166
// Types -------------------------------------------------------------------------
156
167
@@ -377,6 +388,7 @@ import {
377
388
softAssertCompatEnabled
378
389
} from './compat/compatConfig'
379
390
import { resolveFilter as _resolveFilter } from './helpers/resolveAssets'
391
+ import { NOOP } from '@vue/shared'
380
392
381
393
/**
382
394
* @internal only exposed in compat builds
You can’t perform that action at this time.
0 commit comments