mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 23:20:07 +00:00
## Summary
Backports the ComfyNodeDefImpl browser context fix from #5775 to the
core/1.27 branch.
## Changes
- Move ComfyNodeDefImpl instantiation to browser context to avoid
Node.js compatibility issues
- Add workers: 1 to playwright i18n config for consistent execution
- Fix floating promise by awaiting page.route() call
- Add allowDefaultProject config for playwright and script files to
resolve ESLint parsing
## Original Issue
The `collect-i18n-node-defs.ts` script was failing due to Vue components
being imported into Node.js context, causing Babel compilation errors
with TypeScript 'declare' fields.
## Solution
Uses dynamic imports to defer module loading until runtime in the
browser context, avoiding Babel compilation of problematic
TypeScript/Vue files.
Cherry-picked from 3a9365af1
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5796-fix-collect-i18n-node-defs-backport-ComfyNodeDefImpl-browser-context-fix-to-core-1-27-27a6d73d365081639625f25ecf9553fd)
by [Unito](https://www.unito.io)
Co-authored-by: github-actions <github-actions@github.com>
14 lines
264 B
TypeScript
14 lines
264 B
TypeScript
import { defineConfig } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './scripts',
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
headless: true
|
|
},
|
|
reporter: 'list',
|
|
workers: 1,
|
|
timeout: 60000,
|
|
testMatch: /collect-i18n-.*\.ts/
|
|
})
|