Skip to content

Commit b6b8a79

Browse files
Log experimental notice in RSC Framework Mode (#14340)
1 parent e6e570e commit b6b8a79

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/react-router-dev/vite/rsc/plugin.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,24 @@ export function reactRouterRSCVitePlugin(): Vite.PluginOption[] {
280280
await configLoader.close();
281281
},
282282
},
283+
(() => {
284+
let logged = false;
285+
function logExperimentalNotice() {
286+
if (logged) return;
287+
logged = true;
288+
logger.info(
289+
colors.yellow(
290+
`${viteCommand === "serve" ? " " : ""}🧪 Using React Router's RSC Framework Mode (experimental)`,
291+
),
292+
);
293+
}
294+
return {
295+
name: "react-router/rsc/log-experimental-notice",
296+
sharedDuringBuild: true,
297+
buildStart: logExperimentalNotice,
298+
configureServer: logExperimentalNotice,
299+
};
300+
})(),
283301
{
284302
name: "react-router/rsc/typegen",
285303
async config(viteUserConfig, { command, mode }) {

0 commit comments

Comments
 (0)