Skip to content

Conversation

@cosine7
Copy link
Contributor

@cosine7 cosine7 commented Nov 1, 2025

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.

@netlify
Copy link

netlify bot commented Nov 1, 2025

Deploy Preview for playground-vueuse ready!

Name Link
🔨 Latest commit 4a9a151
🔍 Latest deploy log https://app.netlify.com/projects/playground-vueuse/deploys/691924091b115000080dd26f
😎 Deploy Preview https://deploy-preview-20--playground-vueuse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cosine7 cosine7 marked this pull request as draft November 1, 2025 04:02
@cosine7 cosine7 marked this pull request as ready for review November 1, 2025 04:20
@cosine7 cosine7 changed the title fix: fetch VueUse package.json main field on version changes fix: fetch VueUse package.json module field on version changes Nov 1, 2025
@OrbisK
Copy link
Member

OrbisK commented Nov 10, 2025

I think we can have a simple if for version 14+. here.

@OrbisK
Copy link
Member

OrbisK commented Nov 10, 2025

Maybe even better: https://cdn.jsdelivr.net/npm/@vueuse/[email protected]/+esm (+esm) should work too (for vueuse >= 13).

@cosine7 cosine7 changed the title fix: fetch VueUse package.json module field on version changes fix: use +esm for vueuse >= 13 Nov 15, 2025
@cosine7
Copy link
Contributor Author

cosine7 commented Nov 15, 2025

Maybe even better: https://cdn.jsdelivr.net/npm/@vueuse/[email protected]/+esm (+esm) should work too (for vueuse >= 13).

👍 updated

]
function generateVueUseImportCDNs() {
const file = Number.parseInt(vueuseVersion.value) >= 13 ? '+esm' : 'index.mjs'
Copy link
Member

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

Copy link
Member

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 fixed

@cosine7 cosine7 requested a review from OrbisK November 16, 2025 01:28
@OrbisK OrbisK merged commit 1ba556a into vueuse:main Nov 16, 2025
4 checks passed
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.

BUG | Playground does not work for 14.0.0 vue use. BUG | Playground is not working for the alpha releases.

2 participants