Skip to content

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

Merged
antfu merged 14 commits into
mainfrom
feat/esm
Mar 10, 2025
Merged

feat!: drop CJS build, now it's ESM-only#4581
antfu merged 14 commits into
mainfrom
feat/esm

Conversation

@antfu

@antfu antfu commented Feb 14, 2025

Copy link
Copy Markdown
Member

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
Comment thread packages/core/package.json
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

userquin commented Feb 15, 2025

Copy link
Copy Markdown
Contributor

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

Comment thread packages/components/package.json Outdated
@userquin

userquin commented Feb 15, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread packages/core/package.json
@9romise

This comment was marked as resolved.

@userquin

userquin commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

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

userquin commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

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

43081j commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator

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

@userquin

userquin commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

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

43081j commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator

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

antfu commented Mar 5, 2025

Copy link
Copy Markdown
Member Author

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
@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