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

The component does not work anymore on server-side rendering #195

Open
Tarrask opened this issue Jun 17, 2021 · 5 comments
Open

The component does not work anymore on server-side rendering #195

Tarrask opened this issue Jun 17, 2021 · 5 comments
Labels

Comments

@Tarrask
Copy link

Tarrask commented Jun 17, 2021

This concern nuxt.js, the server is complaining about "document is not defined" if we register the Icon component in a plugin as a global component.

the reason that I identify is that the distribution now ship a "precompiled" Icon.js file instead of Icon.vue file and the Icon.js file has referenced to document.

Is it possible to ship both files ? So with nuxt.js we can, use it like that in a plugin :

import Vue from 'vue'
import Icon from 'vue-awesome/components/Icon.vue'

Vue.component('FaIcon', Icon)
@Justineo Justineo added the bug label Jun 17, 2021
@LuizPelegrini
Copy link

I also can't run my Nuxt project because of this server-side issue

@kingyue737
Copy link

I also want to use this package in my nuxt project. Which version supports server-side rendering?

@Tarrask
Copy link
Author

Tarrask commented Sep 9, 2021

I use version 3.5.4, if I remember correctly, 4.x.x do not support ssr

@Justineo
Copy link
Owner

Justineo commented Sep 9, 2021

Sorry folks. I've been busy recently and I'll take a look at this when I get time. Before that, you can stick to v3 for now.

@kingyue737
Copy link

~4.1.0 works

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

No branches or pull requests

4 participants