feat: add @vitejs/plugin-rsc#521
Conversation
| "typescript": "^5.8.3", | ||
| "typescript-eslint": "^8.35.1", | ||
| "vite": "^6.3.3", | ||
| "vite": "^7.0.1", |
There was a problem hiding this comment.
Made a PR for Vite 7 bump separately #522
| if (pkgName === 'plugin-rsc') return | ||
|
|
There was a problem hiding this comment.
This change will be removed later on, right? (and the one below)
There was a problem hiding this comment.
I'm not sure yet if I switch to ## Unreleased convention. For now, I'll let this skip and use my convention.
There was a problem hiding this comment.
I'm fine with that. Instead, could we have a small comment in generateChangelog method so that it's easier to find how the changelog is generated?
There was a problem hiding this comment.
I added a comment. Probably the release flow will be to create a PR to just update CHANGELOG.md, then merge it and then run pnpm release on main.
There was a problem hiding this comment.
Maybe calling run('pnpm', ['changelog']) here would make it a bit easier? (run function: https://github.com/vitejs/vite/blob/4fc9b6424c27aca8004c368b69991a56264e4fdb/scripts/releaseUtils.ts#L8-L14)
Or the generateChangelog function I added recently can be used if you are fine with a slightly different output.
https://github.com/vitejs/vite/blob/41e83f62b1adb65f5af4c1ec006de1c845437edc/scripts/release.ts#L16-L19
There was a problem hiding this comment.
generateChangelog probably works. Let's try that 👍
Co-authored-by: 翠 <green@sapphi.red>
commit: |
Co-authored-by: 翠 <green@sapphi.red>
There was a problem hiding this comment.
Pull Request Overview
Adds a new @vitejs/plugin-rsc package—a copy of @hiogawa/vite-rsc renamed and integrated into this monorepo.
Key changes:
- Included
plugin-rscin workspace, release scripts, and CI workflow - Added build and test configs (
vitest.config.ts,tsdown.config.ts,tsconfig*.json) forplugin-rsc - Introduced all source files under
packages/plugin-rsc, including utilities, transforms, core logic, examples, and E2E setup
Reviewed Changes
Copilot reviewed 192 out of 208 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/release.ts | Added plugin-rsc to release pipeline and changelog generation |
| pnpm-workspace.yaml | Included packages/plugin-rsc/examples/* in workspace |
| packages/plugin-rsc/vitest.config.ts | Vitest setup for plugin-rsc |
| packages/plugin-rsc/tsdown.config.ts | Documentation generator config for plugin-rsc |
| packages/plugin-rsc/tsconfig*.json | TypeScript configuration for plugin-rsc |
| packages/plugin-rsc/src/** | All plugin runtime, transform, and core implementation |
| packages/plugin-rsc/examples/** | Starter example and configuration files |
Comments suppressed due to low confidence (1)
packages/plugin-rsc/src/vite-utils.ts:3
- The
vite-utils.tsfile provides many path and URL helpers but has no accompanying unit tests; adding tests for edge cases (Windows paths, query injection, ID wrapping) will help ensure reliability.
import fs from 'node:fs'
sapphi-red
left a comment
There was a problem hiding this comment.
I think we should remove this line in the future. But that can be done in a separate PR.
https://github.com/hi-ogawa/vite-plugin-react/blob/35577644c85c606015d4c23b866b34386424fb9c/eslint.config.js#L16
Description
This PR adds
@vitejs/plugin-rsc, which is an exact copy of@hiogawa/vite-rscbut simply the package is renamed.From my own development perspective, having the code in this repo doesn't seem to have any downside at least. Though the code added here is substantially large, its scope is limited to do nothing but enabling "React feature" on Vite, so I think including it here isn't too stretch. Please let me know what you think.
todo
ubuntu-latest / chromiumCI is required for PR merge.@hiogawa/vite-rscto@vitejs/plugin-rsctodo (follow up)
@vitejs/plugin-rsc@hiogawa/vite-rscwith@vitejs/plugin-rscremix-run/react-router#13933@vitejs/plugin-rscvite#20351@hiogawa/vite-rscand redirect people to@vitejs/plugin-rscchore: deprecate@hiogawa/vite-rscin favor of@vitejs/plugin-rschi-ogawa/vite-plugins#1130