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

Function innerRendererPlugin

packages/hosts/mcp-apps-shell/src/vite.ts:128–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127/** Add to an app's `plugins` array to make the shell bundleable in that app. */
128export const innerRendererPlugin = (): InnerRendererVitePlugin => ({
129 name: "executor-inner-renderer-source",
130 // `pre` so the virtual id resolves before any generic resolver claims it.
131 enforce: "pre",
132 resolveId: (id) => (id === VIRTUAL_ID ? RESOLVED_ID : undefined),
133 load: async (id) => {
134 if (id !== RESOLVED_ID) return undefined;
135 return `export default ${JSON.stringify(await bundleInnerRenderer())};`;
136 },
137});
138
139// ---------------------------------------------------------------------------
140// The in-frame Tailwind compiler, as source text

Callers 5

appPluginFunction · 0.90
vite.config.tsFile · 0.90
vite.config.tsFile · 0.90
vite.config.tsFile · 0.90

Calls 1

bundleInnerRendererFunction · 0.85

Tested by

no test coverage detected