Closed Pyro979 closed 5 years ago
Im having the same problem as you, im getting tons of warning for all the function i declare globally in globals.js. Any workaround other that the solution above?
@warrence just created a pull request #21 to hopefully resolve the issue. @alexjoverm please take a look to confirm my logic makes sense.
I'm having the same issue here also. Thanks for creating the pull request @Pyro979! Haven't given it a try yet, but will do so tomorrow.
@Pyro979 It didn't provide a solution for me unfortunately. However, I'm experiencing a slightly different issue. In my case the mixin provides methods. Also, I'm running Nuxt, which may be another factor.
While looking into the issue I found that (with your code) the methods are not actually passed through, but the error persists. This means my issue probably lies outside the scope of the VRuntime code.
@Solinx have you tried just replacing the template directly in the code to narrow it down? I unfortunately don't have experience with Nuxt, so not sure how much I can help.
The duplication error only occurs on pages with VRuntime. For now I'm just avoiding the use of global mixins. We use this dynamic component to display blog articles with embedded Vue templates from an api. There are other ways to make the mixin functionality available, but so far I've not found good alternatives to VRuntime.
Argh... sorry, it looks like cache got the better of me earlier 😞 I'm not seeing any errors now. Many thanks! 👍
Closed by #21
Love the library!
Ran into an issue using your library and trying to create my own mixin. I'm adding a
currentEnumStore
variable to data in my mixin. Works fine for regular components, but throws the following warning for the VRuntimeTemplate components.for now I worked around it by checking if the variable exists, but it's not ideal.
I'm not sure if it's even possible to resolve this, since I'm assuming you grab every data and prop and pass them on, and once the template is rendered it tries to add them. But maybe there is a way to pass in global options to have a black list of data/props that shouldn't be proxied since they will be added?
Thoughts.