mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Implements a solution to handle Vite define replacements during Playwright's Babel compilation for i18n collection tests. This resolves ReferenceErrors caused by unprocessed compile-time constants like __DISTRIBUTION__. Changes: - Add babel-plugin-vite-define.cjs to replace Vite define constants - Add babel-plugin-inject-globals.cjs to inject browser globals setup - Add setup-i18n-globals.mjs for JSDOM-based browser environment - Update playwright.i18n.config.ts with Babel plugin configuration - Install babel-plugin-module-resolver for @ alias support The implementation follows the approach from PR #5515 but is adapted for the current codebase structure. The Babel plugins run during Playwright's test compilation to ensure all Vite define constants are replaced with their actual values before execution. Fixes #10981 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>