Skip to content

Commit b12beb0

Browse files
danielroecexbrayat
authored andcommitted
fix: set global provides before running vue plugins
1 parent ccf8756 commit b12beb0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/createInstance.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,14 @@ export function createInstance(
266266
}
267267
}
268268

269+
// provide any values passed via provides mounting option
270+
if (global.provide) {
271+
for (const key of Reflect.ownKeys(global.provide)) {
272+
// @ts-ignore: https://github.com/microsoft/TypeScript/issues/1863
273+
app.provide(key, global.provide[key])
274+
}
275+
}
276+
269277
// use and plugins from mounting options
270278
if (global.plugins) {
271279
for (const plugin of global.plugins) {
@@ -296,14 +304,6 @@ export function createInstance(
296304
app.directive(key, global.directives[key])
297305
}
298306

299-
// provide any values passed via provides mounting option
300-
if (global.provide) {
301-
for (const key of Reflect.ownKeys(global.provide)) {
302-
// @ts-ignore: https://github.com/microsoft/TypeScript/issues/1863
303-
app.provide(key, global.provide[key])
304-
}
305-
}
306-
307307
// stubs
308308
// even if we are using `mount`, we will still
309309
// stub out Transition and Transition Group by default.

0 commit comments

Comments
 (0)