mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 18:07:22 +00:00
12 lines
237 B
TypeScript
12 lines
237 B
TypeScript
import { defineComponent } from 'vue'
|
|
|
|
export default defineComponent({
|
|
name: 'DevOnly',
|
|
setup (_, props) {
|
|
if (import.meta.dev) {
|
|
return () => props.slots.default?.()
|
|
}
|
|
return () => props.slots.fallback?.()
|
|
}
|
|
})
|