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
Could someone, please, clarify for me the way Vue plugins should be connected to the framework.
1.
If I use vueify (and I use it), I can use vue-i18n in the next way:
// ready translated localesvarlocales={'en-US': {message: {hello: 'the world'}}}// set plugins// vue-i18nVue.use(require('vue-i18n'),{lang: 'en-US',locales: locales});// vue-routerVue.use(require('vue-router'));// vue-resourceVue.use(require('vue-resource'));// -- end of the plugins setup
Then, after my project will be "vueified", my target app.js would have vue-i18n library's code inside.
It has no sense anymore, to connect it in index.html directly, like:
2.
But what if I want to connect this plugin from index.html, not using vueify.
What should I do then ? What should I write to the
Vue.use(***,{lang: 'en-US',locales: locales});
under which variable, the plugin is exposed if it's connected via front-end? Should I ever use it this way?
I found vue-i18n/example/bower/index.html , but it is missing the index.js file.
Regards,
The text was updated successfully, but these errors were encountered:
Hi,
Could someone, please, clarify for me the way Vue plugins should be connected to the framework.
1.
If I use
vueify
(and I use it), I can usevue-i18n
in the next way:Then, after my project will be "vueified", my target app.js would have
vue-i18n
library's code inside.It has no sense anymore, to connect it in
index.html
directly, like:2.
But what if I want to connect this plugin from index.html, not using
vueify
.What should I do then ? What should I write to the
under which variable, the plugin is exposed if it's connected via front-end? Should I ever use it this way?
I found
vue-i18n/example/bower/index.html
, but it is missing the index.js file.Regards,
The text was updated successfully, but these errors were encountered: