Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Comfy scripts: playwright-core loads only when the template export runs

Claude7f18ddb7670d
diff --git a/scripts/comfy/export-templates.mjs b/scripts/comfy/export-templates.mjs
index 453cb049..32cc44a1 100644
--- a/scripts/comfy/export-templates.mjs
+++ b/scripts/comfy/export-templates.mjs
@@ -23,7 +23,6 @@
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
-import { chromium } from 'playwright-core';
const HERE = path.dirname(fileURLToPath(import.meta.url));
const COMFYUI_URL = process.env.COMFYUI_URL || 'http://127.0.0.1:8188';
@@ -138,6 +137,9 @@ export function resolveSource(arg) {
}
async function main() {
+ // playwright-core is scripts/comfy's own dependency (npm install here), loaded only when the export runs:
+ // build-library.mjs and the tests import this file's other exports with the root node_modules alone.
+ const { chromium } = await import('playwright-core');
let args = process.argv.slice(2);
if (!args.length) {
const { SPEC } = await import(path.join(HERE, 'library.spec.mjs'));