Skip to content

Commit e87bd7f

Browse files
committed
fix(rsc): expose only "use server" functions
1 parent 7e31ad0 commit e87bd7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/plugin-rsc/src/transforms/wrap-export.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function transformWrapExport(
3737
end: number,
3838
exports: { name: string; meta: ExportMeta }[],
3939
) {
40+
exportNames.push(...exports.map((e) => e.name))
4041
// update code and move to preserve `registerServerReference` position
4142
// e.g.
4243
// input
@@ -64,6 +65,7 @@ export function transformWrapExport(
6465
}
6566

6667
function wrapExport(name: string, exportName: string, meta: ExportMeta = {}) {
68+
exportNames.push(exportName)
6769
if (!filter(exportName, meta)) {
6870
toAppend.push(`export { ${name} as ${exportName} }`)
6971
return

0 commit comments

Comments
 (0)