fix(kit): template dst should become plugin src (#448)

This commit is contained in:
Ahad Birang 2021-08-17 00:30:43 +04:30 committed by GitHub
parent d3582bf1e8
commit 6c37bad73a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -135,9 +135,10 @@ export function addPluginTemplate (plugin: NuxtPluginTemplate | string, opts: Ad
if (typeof plugin === 'string') {
plugin = { src: plugin }
}
if (!plugin.src) {
plugin.src = addTemplate(plugin).dst
}
// Update plugin src to template destination
plugin.src = addTemplate(plugin).dst
return addPlugin(plugin, opts)
}