N
Nuxt3mo ago
Flo

Is there an equivalent for `<DevOnly>` for non-component code?

I need to change my NuxtAuthHandler depending on the dev server...
2 Replies
danielroe
danielroe3mo ago
Yes, you can use if (import.meta.dev) { ... }. In build that will be tree-shaken out.
Flo
Flo3mo ago
lovely! thanks! (I'd suggest adding that to the docs somewhere)