UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

14 lines (13 loc) 368 B
import { defineComponent } from "vue"; //#region src/app/components/dev-only.ts const DevOnly = defineComponent({ name: "DevOnly", inheritAttrs: false, ...import.meta.dev && { slots: Object }, setup(_, props) { if (import.meta.dev) return () => props.slots.default?.(); return () => props.slots.fallback?.(); } }); //#endregion export { DevOnly as default };