@xiaou66/vite-plugin-vue-mcp-next 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1465,7 +1465,7 @@ function createRuntimeInjectionController(options, getConfig) {
1465
1465
  },
1466
1466
  load(id) {
1467
1467
  if (id === RESOLVED_VIRTUAL_RUNTIME_ID) {
1468
- return "import { startRuntimeClient } from '@xiaou66/vite-plugin-vue-mcp-next/runtime/client';\nvoid startRuntimeClient();";
1468
+ return createRuntimeModule();
1469
1469
  }
1470
1470
  if (id === RESOLVED_VIRTUAL_SCREENSHOT_CONFIG_ID) {
1471
1471
  return createScreenshotConfigModule(options);
@@ -1505,6 +1505,14 @@ ${code}`;
1505
1505
  }
1506
1506
  };
1507
1507
  }
1508
+ function createRuntimeModule() {
1509
+ return [
1510
+ "import { setScreenshotModuleRegistry, startRuntimeClient } from '@xiaou66/vite-plugin-vue-mcp-next/runtime/client';",
1511
+ `import { screenshotModuleRegistry } from '${VIRTUAL_SCREENSHOT_CONFIG_ID}';`,
1512
+ "setScreenshotModuleRegistry(screenshotModuleRegistry);",
1513
+ "void startRuntimeClient();"
1514
+ ].join("\n");
1515
+ }
1508
1516
  function createScreenshotConfigModule(options) {
1509
1517
  const paths = collectScreenshotImportPaths(options);
1510
1518
  const imports = paths.map((item, index) => `import * as m${String(index)} from ${JSON.stringify(item)};`).join("\n");