diff --git a/packages/plugin-rsc/README.md b/packages/plugin-rsc/README.md index cca3a4d0c..fe626c73a 100644 --- a/packages/plugin-rsc/README.md +++ b/packages/plugin-rsc/README.md @@ -98,7 +98,6 @@ export default defineConfig({ // this environment is responsible for: // - RSC stream deserialization (RSC stream -> React VDOM) // - traditional SSR (React VDOM -> HTML string/stream) - // (NOTE: as it can be seen in the above diagram. SSR is technically an optional mechanism.) ssr: { build: { rollupOptions: { diff --git a/packages/plugin-rsc/examples/hono/package.json b/packages/plugin-rsc/examples/hono/package.json deleted file mode 100644 index a33afc4cf..000000000 --- a/packages/plugin-rsc/examples/hono/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@vitejs/plugin-rsc-examples-hono", - "private": true, - "license": "MIT", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build --app", - "preview": "vite preview" - }, - "dependencies": { - "@vitejs/plugin-rsc": "workspace:*", - "hono": "^4.7.5" - } -} diff --git a/packages/plugin-rsc/examples/hono/public/favicon.ico b/packages/plugin-rsc/examples/hono/public/favicon.ico deleted file mode 100644 index 4aff07660..000000000 Binary files a/packages/plugin-rsc/examples/hono/public/favicon.ico and /dev/null differ diff --git a/packages/plugin-rsc/examples/hono/src/client.tsx b/packages/plugin-rsc/examples/hono/src/client.tsx deleted file mode 100644 index c734dae74..000000000 --- a/packages/plugin-rsc/examples/hono/src/client.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { fetchRSC } from '@vitejs/plugin-rsc/extra/browser' -import React from 'react' -import ReactDOM from 'react-dom/client' - -function main() { - const dom = document.getElementById('root')! - ReactDOM.createRoot(dom).render() -} - -function App() { - return ( -
-

hello client

- -
- ) -} - -function FetchRsc() { - const [rsc, setRsc] = React.useState(null) - - return ( -
- - {rsc} -
- ) -} - -main() diff --git a/packages/plugin-rsc/examples/hono/src/server.tsx b/packages/plugin-rsc/examples/hono/src/server.tsx deleted file mode 100644 index 3499a18c5..000000000 --- a/packages/plugin-rsc/examples/hono/src/server.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { renderRequest } from '@vitejs/plugin-rsc/extra/rsc' -import { Hono } from 'hono' - -const app = new Hono() - -app.get('/api/rsc', (c) => { - const el = ( -
-
Hono!
-
random: ${Math.random().toString(36).slice(2)}
-
- ) - // TODO: request is irrelevant - return renderRequest(c.req.raw, el) -}) - -app.all('/', (c) => { - return renderRequest(c.req.raw, ) -}) - -function Document() { - return ( - - - vite-rsc - - -
- - - ) -} - -export default app.fetch diff --git a/packages/plugin-rsc/examples/hono/tsconfig.json b/packages/plugin-rsc/examples/hono/tsconfig.json deleted file mode 100644 index eeb2d95d9..000000000 --- a/packages/plugin-rsc/examples/hono/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "allowImportingTsExtensions": true, - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "skipLibCheck": true, - "verbatimModuleSyntax": true, - "noEmit": true, - "moduleResolution": "Bundler", - "module": "ESNext", - "target": "ESNext", - "lib": ["ESNext", "DOM", "DOM.Iterable"], - "types": ["vite/client"], - "jsx": "react-jsx" - } -} diff --git a/packages/plugin-rsc/examples/hono/vite.config.ts b/packages/plugin-rsc/examples/hono/vite.config.ts deleted file mode 100644 index fb5b09500..000000000 --- a/packages/plugin-rsc/examples/hono/vite.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import rsc from '@vitejs/plugin-rsc' -import react from '@vitejs/plugin-react' -import { defineConfig } from 'vite' - -export default defineConfig({ - clearScreen: false, - plugins: [ - react(), - rsc({ - entries: { - client: './src/client.tsx', - rsc: './src/server.tsx', - ssr: '@vitejs/plugin-rsc/extra/ssr', - }, - }), - ], - build: { - minify: false, - }, -}) as any diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b58d2d7a..8a63c7def 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -558,15 +558,6 @@ importers: specifier: ^11.2.0 version: 11.3.0(vite@7.0.2(@types/node@22.16.0)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.7.1)) - packages/plugin-rsc/examples/hono: - dependencies: - '@vitejs/plugin-rsc': - specifier: workspace:* - version: link:../.. - hono: - specifier: ^4.7.5 - version: 4.8.3 - packages/plugin-rsc/examples/react-router: dependencies: '@vitejs/plugin-rsc': @@ -4032,10 +4023,6 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - hono@4.8.3: - resolution: {integrity: sha512-jYZ6ZtfWjzBdh8H/0CIFfCBHaFL75k+KMzaM177hrWWm2TWL39YMYaJgB74uK/niRc866NMlH9B8uCvIo284WQ==} - engines: {node: '>=16.9.0'} - hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} @@ -8852,8 +8839,6 @@ snapshots: dependencies: react-is: 16.13.1 - hono@4.8.3: {} - hookable@5.5.3: {} hosted-git-info@6.1.3: