mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
13 lines
372 B
TypeScript
13 lines
372 B
TypeScript
export default defineNuxtPlugin(async (/* nuxtApp */) => {
|
|
const config1 = useRuntimeConfig()
|
|
await new Promise(resolve => setTimeout(resolve, 100))
|
|
const config2 = useRuntimeConfig()
|
|
return {
|
|
provide: {
|
|
asyncPlugin: () => config1 && config1 === config2
|
|
? 'Async plugin works! ' + config1.testConfig
|
|
: 'Async plugin failed!'
|
|
}
|
|
}
|
|
})
|