Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in nuxt.js universal mode. #23

Open
yuta-hayashi opened this issue Aug 10, 2019 · 0 comments
Open

Does not work in nuxt.js universal mode. #23

yuta-hayashi opened this issue Aug 10, 2019 · 0 comments

Comments

@yuta-hayashi
Copy link

Expected Behavior

I used shards-vue in universal mode of nuxt.js. The universal mode executes ssr.

Current Behavior

It did not work at all with the error document is not defined. But, it worked when I changed to spa mode.

Steps to Reproduce

  1. Set nuxt.js to universal mode.
  2. Set shardsVue to nuxt.js plugin.
  3. Use the shardsVue component on the page.

Context (Environment)

I cannot execute SSR or generate in nuxt.js.

Possible Solution

I think it probably contains functions that cannot be executed in SSR.
So when I set the plugin mode in nuxt.config.js to client, it worked fine.

nuxt.config.js

  plugins: [{src:'~/plugins/shardsVue', mode: 'client'}
  ],

I think nuxt.js is one of the most popular frameworks and would you please add this to the documentation if you like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant