File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 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 (
3737 return this . _mount ( el , hydrating )
3838}
3939
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+
4049// devtools global hook
4150/* istanbul ignore next */
4251setTimeout ( ( ) => {
@@ -47,8 +56,8 @@ setTimeout(() => {
4756 process . env . NODE_ENV !== 'production' &&
4857 inBrowser && ! isEdge && / C h r o m e \/ \d + / . test ( window . navigator . userAgent )
4958 ) {
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' +
5261 'https://github.com/vuejs/vue-devtools'
5362 )
5463 }
Original file line number Diff line number Diff line change 1+ function noop ( ) { }
2+
13if ( typeof console === 'undefined' ) {
24 window . console = {
3- warn : function ( ) { } ,
4- error : function ( ) { }
5+ warn : noop ,
6+ error : noop
57 }
68}
79
10+ // avoid info messages during test
11+ console . info = noop
12+
813let asserted
914function hasWarned ( msg ) {
1015 var count = console . error . calls . count ( )
You can’t perform that action at this time.
0 commit comments