Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(app): pass inject/provide helpers as second argument to plugins #226

Merged
merged 1 commit into from
Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/src/nuxt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function createNuxt (options: CreateOptions) {

export function applyPlugin (nuxt: Nuxt, plugin: Plugin) {
if (typeof plugin !== 'function') { return }
return callWithNuxt(nuxt, () => plugin(nuxt))
return callWithNuxt(nuxt, () => plugin(nuxt, nuxt.provide))
}

export async function applyPlugins (nuxt: Nuxt, plugins: Plugin[]) {
Expand Down