-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,15 @@ Vue.prototype.$mount = function ( | |
return this._mount(el, hydrating) | ||
} | ||
|
||
if (process.env.NODE_ENV !== 'production' && | ||
inBrowser && typeof console !== 'undefined') { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
codingcampbell
|
||
console[console.info ? 'info' : 'log']( | ||
`You are running Vue in development mode.\n` + | ||
`Make sure to turn on production mode when deploying for production.\n` + | ||
`See more tips at https://vuejs.org/guide/deployment.html` | ||
) | ||
} | ||
|
||
// devtools global hook | ||
/* istanbul ignore next */ | ||
setTimeout(() => { | ||
|
@@ -47,8 +56,8 @@ setTimeout(() => { | |
process.env.NODE_ENV !== 'production' && | ||
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent) | ||
) { | ||
console.log( | ||
'Download the Vue Devtools for a better development experience:\n' + | ||
console[console.info ? 'info' : 'log']( | ||
'Download the Vue Devtools extension for a better development experience:\n' + | ||
'https://github.com/vuejs/vue-devtools' | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maybe add one more check with
Vue.config.devtools
is turned on?