Skip to content

Commit f858a5d

Browse files
committed
add hint for vue devtools
1 parent 5710bc2 commit f858a5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ export default Vue
2929

3030
// devtools global hook
3131
/* istanbul ignore if */
32-
if (process.env.NODE_ENV !== 'production') {
33-
if (inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
32+
if (process.env.NODE_ENV !== 'production' && inBrowser) {
33+
if (window.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
3434
window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('init', Vue)
35+
} else if (/Chrome\/\d+/.test(navigator.userAgent)) {
36+
console.log(
37+
'Download the Vue Devtools for a better development experience:\n' +
38+
'https://github.com/vuejs/vue-devtools'
39+
)
3540
}
3641
}

0 commit comments

Comments
 (0)