Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Nov 2, 2025

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.
⚠️ Slowing down new functions

Warning: Slowing down new functions

As the VueUse audience continues to grow, we have been inundated with an overwhelming number of feature requests and pull requests. As a result, maintaining the project has become increasingly challenging and has stretched our capacity to its limits. As such, in the near future, we may need to slow down our acceptance of new features and prioritize the stability and quality of existing functions. Please note that new features for VueUse may not be accepted at this time. If you have any new ideas, we suggest that you first incorporate them into your own codebase, iterate on them to suit your needs, and assess their generalizability. If you strongly believe that your ideas are beneficial to the community, you may submit a pull request along with your use cases, and we would be happy to review and discuss them. Thank you for your understanding.


Description

This PR replaces vite with rolldown-vite in the whole repo.

Additional context

#5137 (comment)
Thanks @brc-dd

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. build tools labels Nov 2, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 2, 2025

Open in StackBlitz

@vueuse/components

npm i https://pkg.pr.new/@vueuse/components@5138

@vueuse/core

npm i https://pkg.pr.new/@vueuse/core@5138

@vueuse/electron

npm i https://pkg.pr.new/@vueuse/electron@5138

@vueuse/firebase

npm i https://pkg.pr.new/@vueuse/firebase@5138

@vueuse/integrations

npm i https://pkg.pr.new/@vueuse/integrations@5138

@vueuse/math

npm i https://pkg.pr.new/@vueuse/math@5138

@vueuse/metadata

npm i https://pkg.pr.new/@vueuse/metadata@5138

@vueuse/nuxt

npm i https://pkg.pr.new/@vueuse/nuxt@5138

@vueuse/router

npm i https://pkg.pr.new/@vueuse/router@5138

@vueuse/rxjs

npm i https://pkg.pr.new/@vueuse/rxjs@5138

@vueuse/shared

npm i https://pkg.pr.new/@vueuse/shared@5138

commit: 2ec3604

@9romise 9romise changed the title feat: migrate to rolldown-vite chore(build): migrate to rolldown-vite Nov 2, 2025
@userquin
Copy link
Contributor

userquin commented Nov 2, 2025

We should update playgrounds, maybe updating nuxt also to v4. I guess adding vite with rolldown-vite at resolutions should be better.

Maybe we should check first tests, vitest tests maybe broken using rolldown.

@userquin
Copy link
Contributor

userquin commented Nov 2, 2025

We should update vitest to v4 or apply this patch to fix unit tests using node 24, will check if ported to v3: vitest-dev/vitest#8390 (comment)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 2, 2025
@9romise
Copy link
Member Author

9romise commented Nov 2, 2025

We should update playgrounds, maybe updating nuxt also to v4. I guess adding vite with rolldown-vite at resolutions should be better.

Oh, I did miss those, but we seem not to use playgrounds/nuxt. See: https://github.com/vueuse/vueuse/blob/main/playgrounds/build.sh

Maybe we should check first tests, vitest tests maybe broken using rolldown.

The errors in CI appear to be related to vitest: vitest-dev/vitest#8374. Upgrading to vitest v4 might resolve the issue.

@9romise
Copy link
Member Author

9romise commented Nov 2, 2025

The playgrounds are only used for smoke testing.

@userquin
Copy link
Contributor

userquin commented Nov 2, 2025

The errors in CI appear to be related to vitest: vitest-dev/vitest#8374. Upgrading to vitest v4 might resolve the issue.

Beware, there are some changes we need for browser tests and coverage, browser provider now must be imported from @vitest/browser-<provider>, check: https://vitest.dev/guide/migration.html#vitest-4

@userquin
Copy link
Contributor

userquin commented Nov 2, 2025

Oh, I did miss those, but we seem not to use playgrounds/nuxt. See: https://github.com/vueuse/vueuse/blob/main/playgrounds/build.sh

Where is the sh being used (I use Windows 10/11)? forgot it, it is being used in the CI workflow arggg

@9romise
Copy link
Member Author

9romise commented Nov 2, 2025

The errors in CI appear to be related to vitest: vitest-dev/vitest#8374. Upgrading to vitest v4 might resolve the issue.

Beware, there are some changes we need for browser tests and coverage, browser provider now must be imported from @vitest/browser-<provider>, check: https://vitest.dev/guide/migration.html#vitest-4

Thanks for the heads-up! 💚 I've noticed it and am already working on the upgrade in a separate branch. I'll submit a PR once it's ready.

@9romise 9romise changed the title chore(build): migrate to rolldown-vite chore(dev-deps): migrate to rolldown-vite Nov 2, 2025
Comment on lines 72 to 89
optimizeDeps: {
exclude: [
'@vueuse/shared',
'@vueuse/core',
'body-scroll-lock',
'@vue/repl',
],
include: [
'axios',
'yaml',
'nprogress',
'qrcode',
'tslib',
'fuse.js',
'universal-cookie',
],
disabled: 'dev',
noDiscovery: true,
},
Copy link
Member Author

@9romise 9romise Nov 2, 2025

Choose a reason for hiding this comment

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

Please note: optimizeDeps.disabled has been deprecated, so I've modified this section accordingly. I'm not entirely sure if the change is correct, so I'd appreciate it if you could pay extra attention during review.

Here is the documentation: https://vite.dev/config/dep-optimization-options.html#optimizedeps-disabled

Copy link
Collaborator

Choose a reason for hiding this comment

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

doesn't this mean we should still have include?

it sounds like noDiscovery just means anything not inside include will not automatically be optimised during dev

so we could still populate include and get rid of exclude maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

IMO, we previously had optimizeDeps.disabled: 'dev', which meant the configuration only took effect during build. However, since Vite 5.1, Vite no longer performs the optimization during build, meaning we now need to disable this feature entirely.

BTW, I also referenced isDepOptimizationDisabled in Vite.

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense 👍

@9romise 9romise requested review from 43081j, OrbisK and antfu November 2, 2025 17:13
@9romise 9romise mentioned this pull request Nov 4, 2025
5 tasks
# Conflicts:
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
Copy link
Collaborator

@43081j 43081j left a comment

Choose a reason for hiding this comment

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

looks good

blocked until the vitest 4 upgrade i guess (which is why ci fails)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build tools lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants