Browse Source

auto install in dist

Evan You 9 năm trước cách đây
mục cha
commit
0c9994f48d
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      src/index.js

+ 5 - 0
src/index.js

@@ -240,6 +240,11 @@ function install (_Vue) {
   override(Vue)
 }
 
+// auto install in dist mode
+if (typeof window !== 'undefined' && window.Vue) {
+  install(window.Vue)
+}
+
 function createLogger () {
   console.warn(
     '[vuex] Vuex.createLogger has been deprecated.' +