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;
const fileName =
roadmapId === fullRoadmapId
? `${roadmapId}.json`
: `${fullRoadmapId}.json`;
roadmapId === fullRoadmapId ? `${roadmapId}.json` : `${fullRoadmapId}.json`;
console.log(fileName);
try {
const roadmapJson = await import(
`../../data/roadmaps/${roadmapId}/${fileName}`
/* @vite-ignore */ `../../data/roadmaps/${roadmapId}/${fileName}`
);
return new Response(JSON.stringify(roadmapJson), {

Loading…
Cancel
Save