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

change index.js (createApp), ondestroy, emits #267

Merged
merged 1 commit into from
Feb 19, 2021
Merged

change index.js (createApp), ondestroy, emits #267

merged 1 commit into from
Feb 19, 2021

Conversation

bzd2000
Copy link

@bzd2000 bzd2000 commented Feb 18, 2021

Hi,

Here is a first attempt to migrate to vue 3 (#213)

Basically:
Changed index.js to use createApp
add emits for emitted events.
changed destoryed to unmounted
upgraded packages to vue 3

There is an issue with not able to load close.svg when I used it in a fresh vue 3 project.
But it is also an issue with the vue2 version.
(seems not to be packed, probably the way it has been defined img src="@/assets/images/close.svg" alt="x")

Some tests are failing due to import statements not working. But that is also to the case for the vue2 version.

besides that, it seems to work for a vue3 project without having tested all the options

@matiasperrone
Copy link
Collaborator

@bzd2000 This will keep the Vue v2 working?

@matiasperrone
Copy link
Collaborator

close svg it was added in the commit 27d5ade on Feb 10

@matiasperrone matiasperrone changed the title change index.js (createApp), ondestory, emits change index.js (createApp), ondestroy, emits Feb 19, 2021
@matiasperrone matiasperrone merged commit 0a304d4 into ZestfulNation:v5 Feb 19, 2021
@matiasperrone
Copy link
Collaborator

You should use "pnpm" instead of "npm" (both have the same interface, same options and commands) at least for development purposes

@matiasperrone matiasperrone self-assigned this Feb 19, 2021
@matiasperrone
Copy link
Collaborator

I am going to start a fresh v3 project and then add the components and the assets. I think it is the best way to go.

@bzd2000
Copy link
Author

bzd2000 commented Feb 19, 2021

Combination vue2 and vue3 is not easy ( a lot of projects tried but always created a separate vue3 branch)

@bzd2000
Copy link
Author

bzd2000 commented Feb 19, 2021

Indeed fresh vue3 will be best.

@bzd2000
Copy link
Author

bzd2000 commented Feb 20, 2021

anyway I don't think there is a lot of code change needed

@matiasperrone
Copy link
Collaborator

I mean that there is code that maintenance is becoming harder and harder, so I want to clean it up a little.

@matiasperrone
Copy link
Collaborator

I have been reading and we may have to create a new version for vue3. So I am going to import the repository in a new one. I let you know once I have spoken with the team.

@matiasperrone
Copy link
Collaborator

Do you want to became a part of the team?

@matiasperrone
Copy link
Collaborator

We may be can have the two components in the same package, I mean the vue3 version and the vue2... although is not very "performant" right?

@bzd2000
Copy link
Author

bzd2000 commented Feb 21, 2021

@matiasperrone ,

I would do the following:

  1. Get out a vue 3 compatible package a soon as possible.
    Main reason, because it gives a good impression for your project.
    Seen your code base, I don't think it will take a lot of effort. You don't seem to use exotic vue features.

    Here you have 2 options:
    A. separate code base (so you need to update twice for changes)
    Easy and fast on the short term.
    B. shared code base for 2 packages
    I have seen other projects trying this. But at the end they created separate code bases because too much time had to be put on maken both vue2 and vue3 work.
    Maybe in your case, it could be easier because you don't use vue plugin system (which complicates vue2/vue3 compatibility).
    But still .... I would not do this.

  2. Start indeed a new repo for a rewrite in vue3 (with composition api) as a v5 project.
    I would also try to check with your user base how long you need to support vue2 and make some clear decision on when vue2 will be deprecated.

I'm available to help on your project

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

Successfully merging this pull request may close these issues.

2 participants