You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid this, Vuex installs itself with the global Vue instance only if it was not installed yet with another Vue instance. (source)
varVue;// bind on installvarStore=functionStore(options){varthis$1=this;if(options===void0)options={};// 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 #731if(!Vue&&typeofwindow!=='undefined'&&window.Vue){install(window.Vue);}
functioninstall(_Vue){if(Vue&&_Vue===Vue){if(process.env.NODE_ENV!=='production'){console.error('[vuex] already installed. Vue.use(Vuex) should be called only once.');}return}Vue=_Vue;applyMixin(Vue);}
The text was updated successfully, but these errors were encountered:
vue-i18n is installing itself on the window even when imported as a module
vue & vue-i18n version
I'm using 7.4.1 but it's not necessarily new to this version.
Steps to reproduce
Load Vue via a script tag, then use another version of Vue in a bundled file (which exposes no globals).
Within the bundle, use vue-i18n.
What is Expected?
vue-i18n to be installed only with my bundle's vue 2.
What is actually happening?
Two warnings and the installation fails with my bundle's Vue.
After examining the
vue-i18n.esm.js
source, it looks like it's installing itself by default on the global Vue instance.To avoid this, Vuex installs itself with the global Vue instance only if it was not installed yet with another Vue instance. (source)
And the
install
function uses theVue
variable.The text was updated successfully, but these errors were encountered: