MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / configResolved

Function configResolved

packages/remix/src/config/vite.ts:61–90  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

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',

Callers

nothing calls this directly

Calls 4

createRemixRouteManifestFunction · 0.90
resolveMethod · 0.65
logMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected