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

fix: add support when using @vue/compat aka migration build #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renatodeleao
Copy link

@renatodeleao renatodeleao commented Nov 16, 2022

Users migrating vue2 apps to vue3 usually start with this package1 if their app is non-trivial. The migration build is usually set with MODE: 2 for having maximum backwards compatibility, but since this component is written in vue3 format we need to let the Vue compiler know.

Alternative: Manually patching

Users can work around this by manually patching the exported object, but less experienced users might not be aware of it when they just see a runtime error in the console.

import VueCountdown from '@chenfengyuan/vue-countdown'
VueCountdown.compatConfig = { MODE: 3 }

Footnotes

  1. https://v3-migration.vuejs.org/migration-build.html

Users migrating vue2 apps to vue3 usually start with this package if their app is non trivial. The migration build is usually set with MODE: 2 for compiling, but since this component is written in vue3 format we need to let vue compiler know.

Alternative: Manually patching

import VueCountdown from '@chenfengyuan/vue-countdown'
VueCountdown.compatConfig = { MODE: 3 }
@Scrum
Copy link

Scrum commented Apr 8, 2024

@fengyuanchen Hi, are there any plans to merge this? Let me know if you need help maintaining this package, I will be glad

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