N
Nuxt4mo 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
danielroe4mo ago
Yes, you can use if (import.meta.dev) { ... }. In build that will be tree-shaken out.
Flo
Flo4mo ago
lovely! thanks! (I'd suggest adding that to the docs somewhere)