geist-org/vue

use the zeit-ui/vue with nuxt miss ReferenceError document is not defined

Loner1024 opened this issue · 2 comments

I use the zeit-ui/vue with nuxt, and I want user the nuxt generate static pages, so the nuxt mode is universal, but when start the project, I miss ReferenceError document is not defined on the 3500 line of /@zeit-ui/vue/dist/zeit-ui.common.js.

I want to know zeit-ui/vue Is there any plan for nuxt support.

unix commented

This issue has been fixed here: #119 . When all checks passed, a patch version will be released(2.0.1) .

Thanks for your contribution, this issue will be closed.

unix commented

By the way, and here's an example:

  1. Add zeit-ui.js to /plugins/zeit-ui.js:
import Vue from 'vue'

Vue.use(require('@zeit-ui/vue'))
  1. Edit nuxt.config.js:
// ...
css: [
  '@zeit-ui/vue/dist/zeit-ui.css',
],
plugins: [
  { src: '~plugins/zeit-ui', ssr: true },
],
  1. Now you can use zeit-ui in Vue template.