Skip to content

Commit

Permalink
fix: set global provides before running vue plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored and cexbrayat committed Apr 27, 2024
1 parent ccf8756 commit b12beb0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/createInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b12beb0

Please sign in to comment.