MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / appPlugin

Function appPlugin

packages/app/vite.ts:39–76  ·  view source on GitHub ↗
(options: AppPluginOptions = {})

Source from the content-addressed store, hash-verified

37 * server-side middleware (api/mcp). Consumers layer those on top.
38 */
39export default function appPlugin(options: AppPluginOptions = {}): PluginOption[] {
40 return [
41 {
42 name: "executor-app:config",
43 config() {
44 return {
45 resolve: {
46 alias: {
47 "@executor-app": APP_ROOT,
48 },
49 dedupe: ["react", "react-dom"],
50 },
51 };
52 },
53 },
54 tailwindcss(),
55 // The artifact page hosts the MCP-Apps shell as a sandboxed iframe over the
56 // MCP-Apps protocol: `mcpAppsShellAsset` emits the built shell document and
57 // hands the page its URL, and `innerRendererPlugin` inlines the shell's own
58 // sandboxed inner frame from `virtual:executor-inner-renderer`.
59 mcpAppsShellAsset() as PluginOption,
60 innerRendererPlugin() as PluginOption,
61 executorVitePlugin({
62 ...(options.executorConfigPath ? { configPath: options.executorConfigPath } : {}),
63 ...(options.executorJsoncPath ? { jsoncPath: options.executorJsoncPath } : {}),
64 }),
65 tanstackRouter({
66 target: "react",
67 autoCodeSplitting: true,
68 routesDirectory: fileURLToPath(new URL("./src/routes", import.meta.url)),
69 generatedRouteTree: fileURLToPath(new URL("./src/routeTree.gen.ts", import.meta.url)),
70 // The route tree definition lives in tsr.routes.ts (shared with
71 // packages/react's routes:gen so a CLI regen matches dev/build).
72 virtualRouteConfig: routes,
73 }),
74 ...react(),
75 ];
76}

Callers 3

vite.config.tsFile · 0.85
vite.config.tsFile · 0.85

Calls 3

mcpAppsShellAssetFunction · 0.90
innerRendererPluginFunction · 0.90
executorVitePluginFunction · 0.85

Tested by

no test coverage detected