switchyard
    Preparing search index...

    Function switchyard

    • A Vite (or Rollup) plugin that renders a machine module imported with a ?switchyard=<format> query, adding &export=Name to pick one machine, into a default-exported string at build time. The module and its imports are watched.

      Parameters

      Returns {
          name: string;
          load(
              this: { addWatchFile(file: string): void },
              id: string,
          ): Promise<string | null>;
      }

      • name: string
      • load: function
        • Renders ?switchyard= imports; any other id is left to the next plugin.

          Parameters

          • this: { addWatchFile(file: string): void }
          • id: string

          Returns Promise<string | null>