Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export async function handleRequest({
}

// Delegate to SSR environment for html rendering.
// The plugin provides `loadSsrModule` helper to allow loading SSR environment entry module
// The plugin provides `loadModule` helper to allow loading SSR environment entry module
// in RSC environment. however this can be customized by implementing own runtime communication
// e.g. `@cloudflare/vite-plugin`'s service binding.
const ssrEntryModule = await import.meta.viteRsc.loadModule<
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-rsc/examples/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@vitejs/plugin-rsc": "latest",
"babel-plugin-react-compiler": "19.1.0-rc.3",
"connect": "^3.7.0",
"rsc-html-stream": "^0.0.7",
"sirv": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default async function handler(request: Request): Promise<Response> {
}

// Delegate to SSR environment for html rendering.
// The plugin provides `loadSsrModule` helper to allow loading SSR environment entry module
// The plugin provides `loadModule` helper to allow loading SSR environment entry module
// in RSC environment. however this can be customized by implementing own runtime communication
// e.g. `@cloudflare/vite-plugin`'s service binding.
const ssrEntryModule = await import.meta.viteRsc.loadModule<
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-rsc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-server-dom-webpack": "^19.1.1",
"rsc-html-stream": "^0.0.7",
"tinyexec": "^1.0.1",
"tsdown": "^0.15.6"
},
Expand Down
132 changes: 0 additions & 132 deletions packages/plugin-rsc/src/extra/browser.tsx

This file was deleted.

96 changes: 0 additions & 96 deletions packages/plugin-rsc/src/extra/rsc.tsx

This file was deleted.

57 changes: 0 additions & 57 deletions packages/plugin-rsc/src/extra/ssr.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions packages/plugin-rsc/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ export type RscPluginOptions = {
*/
entries?: Partial<Record<'client' | 'ssr' | 'rsc', string>>

/** @deprecated use `serverHandler: false` */
disableServerHandler?: boolean

/** @default { enviornmentName: "rsc", entryName: "index" } */
serverHandler?:
| {
Expand All @@ -140,9 +137,6 @@ export type RscPluginOptions = {

rscCssTransform?: false | { filter?: (id: string) => boolean }

/** @deprecated use "DEBUG=vite-env:*" to see warnings. */
ignoredPackageWarnings?: (string | RegExp)[]

/**
* This option allows customizing how client build copies assets from server build.
* By default, all assets are copied, but frameworks can establish server asset convention
Expand Down Expand Up @@ -502,7 +496,6 @@ export default function vitePluginRsc(
return oldSend.apply(this, args as any)
}

if (rscPluginOptions.disableServerHandler) return
if (rscPluginOptions.serverHandler === false) return
const options = rscPluginOptions.serverHandler ?? {
environmentName: 'rsc',
Expand Down Expand Up @@ -539,7 +532,6 @@ export default function vitePluginRsc(
}
},
async configurePreviewServer(server) {
if (rscPluginOptions.disableServerHandler) return
if (rscPluginOptions.serverHandler === false) return
const options = rscPluginOptions.serverHandler ?? {
environmentName: 'rsc',
Expand Down Expand Up @@ -701,18 +693,6 @@ export default function vitePluginRsc(
},
},
},
{
// backward compat: `loadSsrModule(name)` implemented as `loadModule("ssr", name)`
name: 'rsc:load-ssr-module',
transform(code) {
if (code.includes('import.meta.viteRsc.loadSsrModule(')) {
return code.replaceAll(
`import.meta.viteRsc.loadSsrModule(`,
`import.meta.viteRsc.loadModule("ssr", `,
)
}
},
},
{
// allow loading entry module in other environment by
// - (dev) rewriting to `server.environments[<env>].runner.import(<entry>)`
Expand Down
5 changes: 0 additions & 5 deletions packages/plugin-rsc/src/rsc-html-stream/browser.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/plugin-rsc/src/rsc-html-stream/ssr.ts

This file was deleted.

Loading
Loading