injector

Allows you to specify an injector to use for injecting dependencies into the component. By default, vuenit will use the base vue-inject object and spawn a new instance with injector.spawn(true), but there will sometimes be cases where you have dependencies registered on a different injector.

{
  injector : require('./custom-injector')
}

using with the Vue option

If you set an injector, vuenit will automatically register it with Vue. If you set a custom Vue object, vuenit will automatically register with the standard injector. However, if you set both a custom Vue object and a custom injector, you will need to handle this manually:

const Vue = require('./some-extended-vue-class');
const injector = require('./custom-injector');
Vue.use(injector);

mount(c, {Vue, injector});

results matching ""

    No results matching ""