mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
13 lines
322 B
TypeScript
13 lines
322 B
TypeScript
export default defineNuxtPlugin({
|
|
name: 'depends-on-plugin',
|
|
dependsOn: ['async-plugin'],
|
|
async setup () {
|
|
const nuxtApp = useNuxtApp()
|
|
if (!nuxtApp.$asyncPlugin) {
|
|
throw new Error('$asyncPlugin is not defined')
|
|
}
|
|
await new Promise(resolve => setTimeout(resolve, 100))
|
|
},
|
|
parallel: true
|
|
})
|