Repository: remix-run/react-router
File: packages/react-router-dev/vite/plugin.ts (TypeScript)

Code before:
        });

        reactRouterConfigLoader.onChange(
          async ({
            result,
            configCodeChanged,
            routeConfigCodeChanged,
            configChanged,
            routeConfigChanged,
          }) => {
            if (!result.ok) {
              invalidateVirtualModules(viteDevServer);
              logger.error(result.error, {
                clear: true,
                timestamp: true,
              });
              return;
            }

            let message = (() => {
              if (configChanged) return "Config changed.";
              if (routeConfigChanged) return "Route config changed.";
              if (configCodeChanged) return "Config saved.";
              if (routeConfigCodeChanged) return "Route config saved.";
              return "Config saved.";
            })();

            logger.info(colors.green(message), {
              clear: true,
              timestamp: true,
            });

            await updatePluginContext();

            if (configChanged || routeConfigChanged) {
              invalidateVirtualModules(viteDevServer);
            }
          }
        );

        return () => {
          // Let user servers handle SSR requests in middleware mode,
          // otherwise the Vite plugin will handle the request
          if (!viteDevServer.config.server.middlewareMode) {
            viteDevServer.middlewares.use(async (req, res, next) => {
              try {
                let build = (await viteDevServer.ssrLoadModule(
                  serverBuildId
                )) as ServerBuild;

                let handler = createRequestHandler(build, "development");

Review comment (suggestion):
Couldn't help myself, had to see how this looked as a nested ternary

```suggestion
            // prettier-ignore
            let message =
              configChanged ? "Config changed." :
              routeConfigChanged ? "Route config changed." :
              configCodeChanged ? "Config saved." :
              routeConfigCodeChanged ? "Route config saved." :
              "Config saved.";
```

Feel free to leave as is if you prefer, but I do like the ternary form better / less ceremony

Code after:
        clientLoaderModule: undefined,
        clientMiddlewareModule: undefined,
        hydrateFallbackModule: undefined,
        hasAction: sourceExports.includes("action"),
        hasLoader: sourceExports.includes("loader"),
        hasClientAction,
        hasClientLoader,
        hasClientMiddleware,
        hasErrorBoundary: sourceExports.includes("ErrorBoundary"),
        imports: [],
      };
    }

    let sri: ReactRouterManifest["sri"] = undefined;

    let reactRouterManifestForDev = {
      version: String(Math.random()),
      url: combineURLs(ctx.publicPath, virtual.browserManifest.url),
      hmr: {
        runtime: combineURLs(ctx.publicPath, virtualInjectHmrRuntime.url),
      },
      entry: {
        module: combineURLs(
          ctx.publicPath,
          resolveFileUrl(ctx, ctx.entryClientFilePath)
        ),
        imports: [],
      },
      sri,
      routes,
    };

    currentReactRouterManifestForDev = reactRouterManifestForDev;

    return reactRouterManifestForDev;
  };

  const loadCssContents: LoadCssContents = async (viteDevServer, dep) => {
    invariant(
      viteCommand === "serve",
      "loadCssContents is only available in dev mode"
    );

    if (dep.file && isCssModulesFile(dep.file)) {
      return cssModulesManifest[dep.file];
    }

    const vite = getVite();
    const viteMajor = parseInt(vite.version.split(".")[0], 10);

    const url =