Bundle frontend app (#15)

* Add shim in vite build

* shim

* Move public back to src
This commit is contained in:
Chenlei Hu
2024-06-17 12:18:53 -04:00
committed by GitHub
parent 5ce03ca370
commit b794d96eff
4 changed files with 210 additions and 25 deletions

View File

@@ -6,8 +6,9 @@ import { defaultGraph } from "./defaultGraph";
import { getPngMetadata, getWebpMetadata, importA1111, getLatentMetadata } from "./pnginfo";
import { addDomClippingSetting } from "./domWidget";
import { createImageHost, calculateImageGrid } from "./ui/imagePreview"
import { applyTextReplacements, addStylesheet } from "./utils";
import type { ComfyExtension } from "/types/comfy";
import type { IWidget, LGraph, LGraphCanvas, LGraphNode } from "/types/litegraph";
import type { LGraph, LGraphCanvas, LGraphNode } from "/types/litegraph";
export const ANIM_PREVIEW_WIDGET = "$$comfy_animation_preview"
@@ -51,6 +52,12 @@ export class ComfyApp {
static open_maskeditor = null;
static clipspace_return_node = null;
// Force vite to import utils.ts as part of index.
static utils = {
applyTextReplacements,
addStylesheet,
};
ui: ComfyUI;
logging: ComfyLogging;
extensions: ComfyExtension[];