Fix vite warnings

pull/5494/head
Kamran Ahmed 8 months ago
parent 51b8e58d7c
commit edaa108900
  1. 7
      src/pages/[roadmapId]/index.json.ts

@ -26,14 +26,11 @@ export const GET: APIRoute = async function ({ params, url, request, props }) {
: fullRoadmapId; : fullRoadmapId;
const fileName = const fileName =
roadmapId === fullRoadmapId roadmapId === fullRoadmapId ? `${roadmapId}.json` : `${fullRoadmapId}.json`;
? `${roadmapId}.json`
: `${fullRoadmapId}.json`;
console.log(fileName);
try { try {
const roadmapJson = await import( const roadmapJson = await import(
`../../data/roadmaps/${roadmapId}/${fileName}` /* @vite-ignore */ `../../data/roadmaps/${roadmapId}/${fileName}`
); );
return new Response(JSON.stringify(roadmapJson), { return new Response(JSON.stringify(roadmapJson), {

Loading…
Cancel
Save