Skip to content

Commit

Permalink
fix(module): skip devtools renderer page injection if router integrat…
Browse files Browse the repository at this point in the history
…ion is disabled (#2571)
  • Loading branch information
romhml authored Nov 8, 2024
1 parent 503f701 commit afe4003
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,18 @@ export default defineNuxtModule<ModuleOptions>({

nuxt.options.routeRules = defu(nuxt.options.routeRules, { '/__nuxt_ui__/**': { ssr: false } })
extendPages((pages) => {
pages.unshift({
name: 'ui-devtools',
path: '/__nuxt_ui__/components/:slug',
file: resolve('./devtools/runtime/DevtoolsRenderer.vue'),
meta: {
// https://github.com/nuxt/nuxt/pull/29366
// isolate: true
layout: false
}
})
if (pages.length) {
pages.unshift({
name: 'ui-devtools',
path: '/__nuxt_ui__/components/:slug',
file: resolve('./devtools/runtime/DevtoolsRenderer.vue'),
meta: {
// https://github.com/nuxt/nuxt/pull/29366
// isolate: true
layout: false
}
})
}
})

addCustomTab({
Expand Down

0 comments on commit afe4003

Please sign in to comment.