Nuxt/test/fixtures/basic/plugins/10.layer-ordering.ts

11 lines
348 B
TypeScript

export default defineNuxtPlugin((nuxtApp) => {
if (useRoute().path === '/plugins/ordering') {
if (!nuxtApp.$layerPluginPre) {
throw createError('layer plugin failed to run before end project plugin')
}
if (!nuxtApp.$layerPluginPost) {
throw createError('layer plugin failed to run before end project plugin')
}
}
})