-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
SSR rendering with plugins that modifies prototype #392
Comments
i also face the same issue. I downgraded the whole thing to 3.0.0.19. hopefully someone can help me solve the issue |
Same issues here. |
Same issue here. I am using quasar which injects This does not impact the It does not impact the server-side rendering of the real quasar components which are using So I think the only problem is to surpress the error printing for this situation? |
I'm experiencing the same issue. I'm adding a Vue plugin to my app and Apollo is throwing errors when I use it. Tracking the error, it looks exactly as @alx13 described: a result of the // main.js
import Vue from 'vue';
import { DynamicImagePlugin } from './dynamic-image-js';
Vue.use(DynamicImagePlugin, {
// add some options here...
}); <!-- VImg.vue -->
<script>
export default {
computed: {
src() {
return this.$dynamicImage(
// pass some arguments here...
);
},
},
};
</script> That code results in this error:
On the plus side, these errors don't prevent Vue Apollo SSR from working. The app continues to SSR and run as expected. The down side is that my console is full of an insane number of errors making it hard to discern the real errors from the false positives. What can we do to get this one solved? |
I'm also experiencing a SSR (nuxt) error concerning the prototype with VeeValidate
and when not injecting:
I opened an issue with It's critical that we can get a fix out for this, my app heavily depends on I currently have to frankenstein deprecated versions together ( Retweeting @gwardwell : What can we do to get this one solved? |
Will be solved with vuejs/vue#9017 |
This issue involves not only third-party plugins but also @Akryum is there any time schedule for the new PR in the vue main repo to be merged and published? Looking forward to it~ |
See #469 |
I'm having problem with SSR rendering of my project, which is using Vuetify:
Some of the components rely on existance of
$vuetify
property in the instance of Vue inherited fromVue.prototype
(e.g., VToolbar).Obviously, createFakeInstance doesn't merge
$vuetify
fromVue.prototype
into fake instance, causing rendering error in prefetchAll.Unfortunatelly there is no way to supress printing that error to the console.
Some components are using
provide
property of Vue component like in Themeable.createFakeInstance
also ignoresprovide/inject
definitions on component. So there is another rendering error.The quick but very dirty solution for problems mentioned above is to allow to configure COMPONENT_BLACKLIST, for example, using options for
install
method ofvue-apollo/ssr
plugin, or by providing options to theprefetchAll
method.The less hacky solution for the first problem is to provide a list of
Vue.prototype
properties that should be inherited fromGlobals.Vue
uponfakeInstance
creation. Either withVue.use(ApolloSSR, { inheritedProperties: ['$vuetify'] })
, or inprefetchAll
method.For the second problem, I wasn't able to fix it in any way.
The text was updated successfully, but these errors were encountered: