瀏覽代碼

refactor: drop auto install feature

Vue 3 requires to create a new app anyway.
Kia Ishii 5 年之前
父節點
當前提交
9d0abf8b57
共有 1 個文件被更改,包括 0 次插入11 次删除
  1. 0 11
      src/store.js

+ 0 - 11
src/store.js

@@ -10,18 +10,7 @@ export function createStore (options) {
 
 
 export class Store {
 export class Store {
   constructor (options = {}) {
   constructor (options = {}) {
-    // TODO: Bring back this one if needed.
-    //
-    // Auto install if it is not done yet and `window` has `Vue`.
-    // To allow users to avoid auto-installation in some cases,
-    // this code should be placed here. See #731
-    // if (!Vue && typeof window !== 'undefined' && window.Vue) {
-    //   install(window.Vue)
-    // }
-
     if (process.env.NODE_ENV !== 'production') {
     if (process.env.NODE_ENV !== 'production') {
-      // TODO: Maybe we can remove this depending on the new implementation.
-      // assert(Vue, `must call Vue.use(Vuex) before creating a store instance.`)
       assert(typeof Promise !== 'undefined', `vuex requires a Promise polyfill in this browser.`)
       assert(typeof Promise !== 'undefined', `vuex requires a Promise polyfill in this browser.`)
       assert(this instanceof Store, `store must be called with the new operator.`)
       assert(this instanceof Store, `store must be called with the new operator.`)
     }
     }