diff --git a/src/createInstance.ts b/src/createInstance.ts index 1afe8e95e..fe04fcf2a 100644 --- a/src/createInstance.ts +++ b/src/createInstance.ts @@ -266,6 +266,14 @@ export function createInstance( } } + // provide any values passed via provides mounting option + if (global.provide) { + for (const key of Reflect.ownKeys(global.provide)) { + // @ts-ignore: https://github.com/microsoft/TypeScript/issues/1863 + app.provide(key, global.provide[key]) + } + } + // use and plugins from mounting options if (global.plugins) { for (const plugin of global.plugins) { @@ -296,14 +304,6 @@ export function createInstance( app.directive(key, global.directives[key]) } - // provide any values passed via provides mounting option - if (global.provide) { - for (const key of Reflect.ownKeys(global.provide)) { - // @ts-ignore: https://github.com/microsoft/TypeScript/issues/1863 - app.provide(key, global.provide[key]) - } - } - // stubs // even if we are using `mount`, we will still // stub out Transition and Transition Group by default.