Skip to content

Commit 160d6ce

Browse files
committed
chore: do not generate views.ts anymore
This is a follow-up PR for #2271
1 parent 16ab52f commit 160d6ce

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

packages/ts/file-router/src/vite-plugin/createRoutesFromMeta.ts

-3
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,5 @@ export default routes;
128128
);
129129

130130
const file = createSourceFile(routeDeclaration, 'file-routes.ts');
131-
// also keep the old file temporarily for compatibility purposes:
132-
const tempFile = createSourceFile(routeDeclaration, 'views.ts');
133-
printer.printFile(tempFile);
134131
return printer.printFile(file);
135132
}

packages/ts/file-router/src/vite-plugin/generateRuntimeFiles.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,13 @@ export async function generateRuntimeFiles(
6060
logger.info('Collected file-based routes');
6161
const runtimeRoutesCode = createRoutesFromMeta(routeMeta, urls);
6262
const viewConfigJson = await createViewConfigJson(routeMeta);
63-
const tempUrl = new URL('views.ts', urls.code.href);
63+
6464
await Promise.all([
6565
generateRuntimeFile(urls.json, viewConfigJson).then(() =>
6666
logger.info(`Frontend route list is generated: ${String(urls.json)}`),
6767
),
6868
generateRuntimeFile(urls.code, runtimeRoutesCode).then(() =>
6969
logger.info(`File Route module is generated: ${String(urls.code)}`),
7070
),
71-
// also keep the old file temporarily for compatibility purposes:
72-
generateRuntimeFile(tempUrl, runtimeRoutesCode).then(() =>
73-
logger.info(`Views module is generated: ${String(tempUrl)}`),
74-
),
7571
]);
7672
}

0 commit comments

Comments
 (0)