Skip to content

chore: use types from Vite#279

Merged
DylanPiercey merged 2 commits into
marko-js:mainfrom
sapphi-red:chore/use-types-from-vite
Jun 17, 2026
Merged

chore: use types from Vite#279
DylanPiercey merged 2 commits into
marko-js:mainfrom
sapphi-red:chore/use-types-from-vite

Conversation

@sapphi-red

Copy link
Copy Markdown
Contributor

Description

Use types from vite rather than from rolldown.

Motivation and Context

rolldown is not a dependency / devDeps of this package and is not always possible to import depending on the package manager's behavior. On ecosystem-ci, vite is resolved to the local vite so node_modules/rolldown will not be created by npm, thus the type fails to resolve.
https://github.com/vitejs/vite-ecosystem-ci/actions/runs/27599464088/job/81596799094
This PR would fix the error above by using the types re-exported from vite.

Screenshots (if appropriate):

Checklist:

  • I have updated/added documentation affected by my changes. (it's an internal change)
  • I have added tests to cover my changes. (ecosystem-ci is the tests)

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1581111

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb982eaf-3f46-41f7-a3f0-a0e3c375f0da

📥 Commits

Reviewing files that changed from the base of the PR and between bcaf9bf and 1581111.

📒 Files selected for processing (1)
  • src/rolldown-plugin.ts

Walkthrough

In src/rolldown-plugin.ts, the type import from the rolldown package (Plugin, ModuleType) is replaced with a single Rolldown namespace import from vite. The exported rolldownPlugin function's return type changes from Plugin[] to Rolldown.Plugin[], and the virtual module's moduleType cast changes from ModuleType to Rolldown.ModuleType.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: use types from Vite' is clear and directly describes the main change—switching type imports from rolldown to Vite.
Description check ✅ Passed The description explains the motivation, context, and solution related to the changeset, detailing why types need to be imported from vite instead of rolldown.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DylanPiercey

Copy link
Copy Markdown
Contributor

Appreciate the PR, thanks!

@DylanPiercey DylanPiercey merged commit b45f068 into marko-js:main Jun 17, 2026
6 of 7 checks passed
@sapphi-red sapphi-red deleted the chore/use-types-from-vite branch June 17, 2026 14:57
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.

2 participants