(config)
| 59 | enforce: 'post', |
| 60 | |
| 61 | configResolved(config) { |
| 62 | isDevMode = config.command === 'serve' || config.mode === 'development'; |
| 63 | |
| 64 | try { |
| 65 | const rootDir = config.root || process.cwd(); |
| 66 | |
| 67 | let resolvedAppDirPath = options.appDirPath; |
| 68 | if (resolvedAppDirPath && !path.isAbsolute(resolvedAppDirPath)) { |
| 69 | resolvedAppDirPath = path.resolve(rootDir, resolvedAppDirPath); |
| 70 | } |
| 71 | |
| 72 | const manifest = createRemixRouteManifest({ |
| 73 | appDirPath: resolvedAppDirPath, |
| 74 | rootDir, |
| 75 | }); |
| 76 | |
| 77 | routeManifestJson = JSON.stringify(manifest); |
| 78 | |
| 79 | if (isDevMode) { |
| 80 | // eslint-disable-next-line no-console |
| 81 | console.log( |
| 82 | `[Sentry Remix] Found ${manifest.staticRoutes.length} static and ${manifest.dynamicRoutes.length} dynamic routes`, |
| 83 | ); |
| 84 | } |
| 85 | } catch (error) { |
| 86 | // eslint-disable-next-line no-console |
| 87 | console.error('[Sentry Remix] Failed to generate route manifest:', error); |
| 88 | routeManifestJson = JSON.stringify({ dynamicRoutes: [], staticRoutes: [] }); |
| 89 | } |
| 90 | }, |
| 91 | |
| 92 | transformIndexHtml: { |
| 93 | order: 'pre', |
nothing calls this directly
no test coverage detected