(dir: string, name: string, file: string)
| 50 | |
| 51 | /** A route module the way Medusa writes one: a barrel that hands React Router its page as `Component`. */ |
| 52 | const routeModule = (dir: string, name: string, file: string): Record<string, string> => ({ |
| 53 | [`${dir}/index.ts`]: `export { ${name} as Component } from './${file}';\n`, |
| 54 | [`${dir}/${file}.tsx`]: `export const ${name} = () => {\n return <div>${name}</div>;\n};\n`, |
| 55 | }); |
| 56 | |
| 57 | const MEDUSA_APP = `import { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom'; |
| 58 | import { getRouteMap } from './routes/get-route.map'; |
no outgoing calls
no test coverage detected