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

Doesn't play nice with Decorated Typescript #266

Open
johnnyshankman opened this issue Jul 31, 2022 · 1 comment
Open

Doesn't play nice with Decorated Typescript #266

johnnyshankman opened this issue Jul 31, 2022 · 1 comment

Comments

@johnnyshankman
Copy link

johnnyshankman commented Jul 31, 2022

When using: https://github.com/vuejs/vue-class-component

And exporting a component using @Component syntax, this plugin dies and complains about the following:

 Cannot read properties of undefined (reading '_init')

Non-decorated TS exports work just fine. Any help? Rewriting my whole codebase to be non-decorated would take quite some time.

https://github.com/karol-f/vue-custom-element#javascript---register-with-vue-custom-element

Seems to only understand this one very specific output.

Seems to trip over:

        var Sub = function VueComponent(options) {
            this._init(options);
        };

Problem to me seems that we already have a VueComponent, that's what @Component shims the output of your export to. Can we add a check to see if this is already done and support this other export type?

Me logging my export that gets passed in to the second param of Vue.customElement
Screen Shot 2022-07-31 at 4 13 36 PM

@medialwerk
Copy link

I think it is related to #219

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

2 participants