(options: AppPluginOptions = {})
| 36 | * server-side middleware (api/mcp). Consumers layer those on top. |
| 37 | */ |
| 38 | export default function appPlugin(options: AppPluginOptions = {}): PluginOption[] { |
| 39 | return [ |
| 40 | { |
| 41 | name: "executor-app:config", |
| 42 | config() { |
| 43 | return { |
| 44 | resolve: { |
| 45 | alias: { |
| 46 | "@executor-app": APP_ROOT, |
| 47 | }, |
| 48 | dedupe: ["react", "react-dom"], |
| 49 | }, |
| 50 | }; |
| 51 | }, |
| 52 | }, |
| 53 | tailwindcss(), |
| 54 | executorVitePlugin({ |
| 55 | ...(options.executorConfigPath ? { configPath: options.executorConfigPath } : {}), |
| 56 | ...(options.executorJsoncPath ? { jsoncPath: options.executorJsoncPath } : {}), |
| 57 | }), |
| 58 | tanstackRouter({ |
| 59 | target: "react", |
| 60 | autoCodeSplitting: true, |
| 61 | routesDirectory: fileURLToPath(new URL("./src/routes", import.meta.url)), |
| 62 | generatedRouteTree: fileURLToPath(new URL("./src/routeTree.gen.ts", import.meta.url)), |
| 63 | // The route tree definition lives in tsr.routes.ts (shared with |
| 64 | // packages/react's routes:gen so a CLI regen matches dev/build). |
| 65 | virtualRouteConfig: routes, |
| 66 | }), |
| 67 | ...react(), |
| 68 | ]; |
| 69 | } |
no test coverage detected