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

Vue plugin types and imports #1267

Closed
josh-hemphill opened this issue May 30, 2020 · 3 comments
Closed

Vue plugin types and imports #1267

josh-hemphill opened this issue May 30, 2020 · 3 comments

Comments

@josh-hemphill
Copy link

Version

3.0.0-beta.14

Reproduction link

https://github.com/josh-hemphill/tooltracker.js

Steps to reproduce

Create a plugin for a typescript project

What is expected?

export a valid plugin object

What is actually happening?

typescript type checks throw that the types are not assignable to type Plugin_2


Has the api changed for creating plugins? I couldn't find where Plugin_2 is in the code.
I couldn't figure out how to create a typescript Vue3 project in CodeSandbox so I linked my repo, which is mostly the default setup created with vue-cli-plugin-vue-next.

@posva
Copy link
Member

posva commented May 30, 2020

Don't post your whole project as a reproduction... At the very least, post the code snippet you are trying to do...

Take a look at how the router or vuex do it until docs are published: https://github.com/vuejs/vue-router-next/blob/master/src/install.ts#L67 and https://github.com/vuejs/vue-router-next/blob/master/src/router.ts#L156

@posva posva closed this as completed May 30, 2020
@cbdiesse
Copy link

cbdiesse commented Jun 2, 2020

@posva
Considering your answer,
Can we say, Plugin install mechanism have been changed

  1. from Vue instance target, to App root component target ?
  2. We can not actually use vue 2 plugin tools/libs in vue 3 ?
  3. So constraint to wait for those tools/libs are migrated to vue 3 ?

Please advise ...
e.g. Coreui-vue, Bootstrap-Vue not vue 3 ready, suspecting 6 months to 1 year delay ...

@posva
Copy link
Member

posva commented Jun 2, 2020

Third party libraries need an upgrade yes. Most of them have already started

@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants