Nuxt.js: vue-grid-layout: document is not defined

Created on 27 Jun 2017  路  3Comments  路  Source: nuxt/nuxt.js

I'm trying to use this: https://github.com/jbaysolutions/vue-grid-layout. I do have {src: '~plugins/vue-grid-layout', ssr: false} in nuxt.config, but I still get the document is not defined. Any help would be greatly appreciated.

This question is available on Nuxt.js community (#c842)
help-wanted

Most helpful comment

Hey @navmed . I've prepared a working example for vue-grid-layout. The fact is that unfortunately this library is not desinged for SSR usage. If you still get document related errors, you are likely importing vue-grid-layout somewhere outside of plugin file. I've also added vue-no-ssr wrapper to resolve hydration problems.

Demo: https://vue-grid.glitch.me
Code: https://glitch.com/edit/#!/vue-grid

All 3 comments

Hey @navmed . I've prepared a working example for vue-grid-layout. The fact is that unfortunately this library is not desinged for SSR usage. If you still get document related errors, you are likely importing vue-grid-layout somewhere outside of plugin file. I've also added vue-no-ssr wrapper to resolve hydration problems.

Demo: https://vue-grid.glitch.me
Code: https://glitch.com/edit/#!/vue-grid

Thank you! Your code really helped me.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shyamchandranmec picture shyamchandranmec  路  3Comments

msudgh picture msudgh  路  3Comments

surmon-china picture surmon-china  路  3Comments

vadimsg picture vadimsg  路  3Comments

mattdharmon picture mattdharmon  路  3Comments