File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ Vue.prototype.$mount = function (
37
37
return this . _mount ( el , hydrating )
38
38
}
39
39
40
+ if ( process . env . NODE_ENV !== 'production' &&
41
+ inBrowser && typeof console !== 'undefined' ) {
42
+ console [ console . info ? 'info' : 'log' ] (
43
+ `You are running Vue in development mode.\n` +
44
+ `Make sure to turn on production mode when deploying for production.\n` +
45
+ `See more tips at https://vuejs.org/guide/deployment.html`
46
+ )
47
+ }
48
+
40
49
// devtools global hook
41
50
/* istanbul ignore next */
42
51
setTimeout ( ( ) => {
@@ -47,8 +56,8 @@ setTimeout(() => {
47
56
process . env . NODE_ENV !== 'production' &&
48
57
inBrowser && ! isEdge && / C h r o m e \/ \d + / . test ( window . navigator . userAgent )
49
58
) {
50
- console . log (
51
- 'Download the Vue Devtools for a better development experience:\n' +
59
+ console [ console . info ? 'info' : ' log' ] (
60
+ 'Download the Vue Devtools extension for a better development experience:\n' +
52
61
'https://github.com/vuejs/vue-devtools'
53
62
)
54
63
}
Original file line number Diff line number Diff line change
1
+ function noop ( ) { }
2
+
1
3
if ( typeof console === 'undefined' ) {
2
4
window . console = {
3
- warn : function ( ) { } ,
4
- error : function ( ) { }
5
+ warn : noop ,
6
+ error : noop
5
7
}
6
8
}
7
9
10
+ // avoid info messages during test
11
+ console . info = noop
12
+
8
13
let asserted
9
14
function hasWarned ( msg ) {
10
15
var count = console . error . calls . count ( )
You can’t perform that action at this time.
0 commit comments