How to use vue-client-only - 2 common examples

To help you get started, we’ve selected a few vue-client-only examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github birdayz / kaf / client / .nuxt / index.js View on Github external
import { createRouter } from './router.js'
import NuxtChild from './components/nuxt-child.js'
import NuxtError from '../layouts/error.vue'
import Nuxt from './components/nuxt.js'
import App from './App.js'
import { setContext, getLocation, getRouteData, normalizeError } from './utils'
import { createStore } from './store.js'

/* Plugins */

import nuxt_plugin_plugin_1be8b02e from 'nuxt_plugin_plugin_1be8b02e' // Source: ./vuetify/plugin.js (mode: 'all')
import nuxt_plugin_notifier_3e43155b from 'nuxt_plugin_notifier_3e43155b' // Source: ../plugins/notifier.js (mode: 'all')
import nuxt_plugin_vuetify_d6afc2c2 from 'nuxt_plugin_vuetify_d6afc2c2' // Source: ../plugins/vuetify.js (mode: 'all')

// Component: 
Vue.component(ClientOnly.name, ClientOnly)

// TODO: Remove in Nuxt 3: 
Vue.component(NoSsr.name, {
  ...NoSsr,
  render (h, ctx) {
    if (process.client && !NoSsr._warned) {
      NoSsr._warned = true

      console.warn(' has been deprecated and will be removed in Nuxt 3, please use  instead')
    }
    return NoSsr.render(h, ctx)
  }
})

// Component: 
Vue.component(NuxtChild.name, NuxtChild)

vue-client-only

Vue component to wrap non SSR friendly components

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Popular vue-client-only functions

Similar packages