Closed MrToxy closed 4 years ago
Thank you for raising this issue, the latest version of Vue Social Sharing
has been released with improved support for SSR.
sorry but that doesn't address the original question. Unless the docs aren't updated there's still no way to locally register the component making it truly tree shakable. Do please re-open the issue or attach an example on how to accomplish this
Hello @MrToxy, you are right. I updated the latest version you can now import only the ShareNetwork
component:
<template>
<ShareNetwork
network="facebook"
url="https://vuejs.org/
>
Share on Facebook
</ShareNetwork>
</template>
<script>
import { ShareNetwork } from 'vue-social-sharing'
export default {
components: {
ShareNetwork,
}
}
@nicolasbeauvais amazing, thank you!
I really hate the idea of not having the possibility of importing the components locally, I'm only using this package in one component in my entire app and therefore It doesn't make sense to have it globally registered... so I tried to use it locally. I'ts working but I get a vue warning.
I'm importing it in my component as:
Warning:
Although the components render and work perfectly, I'd like to get rid of this warning, Please do not tell me that the solution is registering the components globally, I know it works, but I want to avoid it and don't see why not.