8000 feat!: drop CJS build, now it's ESM-only by antfu · Pull Request #4581 · vueuse/vueuse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat!: drop CJS build, now it's ESM-only #4581

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

Merged
merged 14 commits into from
Mar 10, 2025
Merged

feat!: drop CJS build, now it's ESM-only #4581

merged 14 commits into from
Mar 10, 2025

Conversation

antfu
Copy link
Member
@antfu antfu commented Feb 14, 2025

Consider the majority of Vue users are using bundlers, dropping CJS should only affect CJS-SSR usage, which is considered rather nitch.

We plan to ship this as v13 on 2025/3/10 (Monday), with this as the sole breaking change.

If you have any feedback, please leave comments below. Thanks.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Feb 14, 2025
43081j
43081j previously approved these changes Feb 14, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 14, 2025
OrbisK
OrbisK previously approved these changes Feb 15, 2025
@userquin
Copy link
Contributor
userquin commented Feb 15, 2025

Why are we still generating CJS stuff? Why are we including CJS stuff in the tgz (cannot remove d.cts from files array)?

@userquin
Copy link
Contributor
userquin commented Feb 15, 2025

Just a note about node10 module resolution (I guess @antfu also wants to drop support for it, shouldn't be a problem): it is resolving correctly the types but not the implementation (subpackages exports other than default => check firebase package at aretypeswrong). I'm testing on my local without generating CJS stuff...

@OrbisK OrbisK modified the milestones: 13.0, 14.0 Feb 15, 2025
@antfu antfu dismissed stale reviews from OrbisK and 43081j via 298a944 March 5, 2025 08:35
43081j
43081j previously approved these changes Mar 5, 2025
@9romise

This comment was marked as resolved.

@userquin
Copy link
Contributor
userquin commented Mar 5, 2025

Uhmm, rigth now @vueuse/core types are broken (latest v12.8.1 and beta v13.0.0-beta.1), cannot resolve @vueuse/core/_configurable:

https://arethetypeswrong.github.io/?p=%40vueuse%2Fcore%4012.8.1

https://arethetypeswrong.github.io/?p=%40vueuse%2Fcore%4013.0.0-beta.1

@userquin
Copy link
Contributor
userquin commented Mar 5, 2025

I guess we can map ./* to ./dist/*.mjs or use imports entry (#) to map internal/private modules (otherwise we'll need to map individual entries, maybe related to @43081j comment)

@43081j
Copy link
Collaborator
43081j commented Mar 5, 2025

It doesn't seem to exist regardless of our export map 😬

@userquin
Copy link
Contributor
userquin commented Mar 5, 2025

It doesn't seem to exist regardless of our export map 😬

Yeah, missing in the tgz file 😬😬

NOTE: the mjs file without the import (it should be inlined), only types using the import, looks like an error in the rollup config file.

@vueuse/core/index.mjs screenshot

imagen

@43081j
Copy link
Collaborator
43081j commented Mar 5, 2025

I guess it's introduced by #4591

Since we didn't import types from configurable before then maybe?

So the rollup bundle has never had to deal with it

Let's pick up on discord @userquin

@ilyaliao ilyaliao modified the milestones: 14.0, 13.0 Mar 5, 2025
@antfu
Copy link
Member Author
antfu commented Mar 5, 2025

That was a mistake, fixed in 3f5da12

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 10, 2025
@antfu antfu merged commit 5e0467b into main Mar 10, 2025
8 checks passed
@antfu antfu deleted the feat/esm branch March 10, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0