File tree 3 files changed +21
-11
lines changed
3 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function flushBatcherQueue () {
42
42
runBatcherQueue ( userQueue )
43
43
// dev tool hook
44
44
/* istanbul ignore if */
45
- if ( devtools ) {
45
+ if ( devtools && config . devtools ) {
46
46
devtools . emit ( 'flush' )
47
47
}
48
48
resetBatcherState ( )
Original file line number Diff line number Diff line change @@ -35,6 +35,13 @@ const config = {
35
35
36
36
warnExpressionErrors : true ,
37
37
38
+ /**
39
+ * Whether to allow devtools inspection.
40
+ * Disabled by default in production builds.
41
+ */
42
+
43
+ devtools : process . env . NODE_ENV !== 'production' ,
44
+
38
45
/**
39
46
* Internal flag to indicate the delimiters have been
40
47
* changed.
Original file line number Diff line number Diff line change 1
1
import Vue from './instance/vue'
2
2
import installGlobalAPI from './global-api'
3
3
import { inBrowser , devtools } from './util/index'
4
+ import config from './config'
4
5
5
6
installGlobalAPI ( Vue )
6
7
@@ -10,14 +11,16 @@ export default Vue
10
11
11
12
// devtools global hook
12
13
/* istanbul ignore next */
13
- if ( devtools ) {
14
- devtools . emit ( 'init' , Vue )
15
- } else if (
16
- process . env . NODE_ENV !== 'production' &&
17
- inBrowser && / C h r o m e \/ \d + / . test ( window . navigator . userAgent )
18
- ) {
19
- console . log (
20
- 'Download the Vue Devtools for a better development experience:\n' +
21
- 'https://github.com/vuejs/vue-devtools'
22
- )
14
+ if ( config . devtools ) {
15
+ if ( devtools ) {
16
+ devtools . emit ( 'init' , Vue )
17
+ } else if (
18
+ process . env . NODE_ENV !== 'production' &&
19
+ inBrowser && / C h r o m e \/ \d + / . test ( window . navigator . userAgent )
20
+ ) {
21
+ console . log (
22
+ 'Download the Vue Devtools for a better development experience:\n' +
23
+ 'https://github.com/vuejs/vue-devtools'
24
+ )
25
+ }
23
26
}
You can’t perform that action at this time.
0 commit comments