-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: use +esm for vueuse >= 13 #20
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
Conversation
✅ Deploy Preview for playground-vueuse ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I think we can have a simple if for version 14+. here. |
|
Maybe even better: |
👍 updated |
app/pages/index.vue
Outdated
| ] | ||
| function generateVueUseImportCDNs() { | ||
| const file = Number.parseInt(vueuseVersion.value) >= 13 ? '+esm' : 'index.mjs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we cant use parseInt here: latest, 13.0.0, 14.0.0-alpha.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use semver (already installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed
fixes #21 fixes #18
by fetching VueUse package.json module field on version changes.
There might be a better solution, but this makes it work for now.