UNPKG

vite-ssr-vue2

Version:

Vite utility for vue2 server side rendering

21 lines (17 loc) 348 B
import Vue from 'vue'; const defineOptions = (opts) => opts; const ClientOnly = Vue.extend({ name: "ClientOnly", data() { return { show: false }; }, mounted() { this.show = true; }, render: function(h) { return this.show ? h("div", this.$slots.default) : h("div"); } }); export { ClientOnly, defineOptions };