mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 15:29:44 +00:00
fix: Add JSON import assertions for Node.js ESM compatibility (#5507)
Added `with { type: 'json' }` assertions to all JSON imports to ensure compatibility with Node.js ES modules and Playwright environments. This follows the current ESM specification where JSON imports require explicit type assertions.
Affected areas:
- Tailwind config
- i18n locale imports (36 files)
- Test fixtures and spec files
- API client feature flags
- Core color palettes
References:
- https://nodejs.org/api/esm.html
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,10 +7,10 @@ import type {
|
||||
ISerialisedGraph,
|
||||
SerialisableGraph
|
||||
} from '../src/types/serialisation'
|
||||
import floatingBranch from './assets/floatingBranch.json'
|
||||
import floatingLink from './assets/floatingLink.json'
|
||||
import linkedNodes from './assets/linkedNodes.json'
|
||||
import reroutesComplex from './assets/reroutesComplex.json'
|
||||
import floatingBranch from './assets/floatingBranch.json' with { type: 'json' }
|
||||
import floatingLink from './assets/floatingLink.json' with { type: 'json' }
|
||||
import linkedNodes from './assets/linkedNodes.json' with { type: 'json' }
|
||||
import reroutesComplex from './assets/reroutesComplex.json' with { type: 'json' }
|
||||
import {
|
||||
basicSerialisableGraph,
|
||||
minimalSerialisableGraph,
|
||||
|
||||
Reference in New Issue
Block a user