mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 23:09:39 +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:
@@ -1,9 +1,9 @@
|
||||
import arc from '@/assets/palettes/arc.json'
|
||||
import dark from '@/assets/palettes/dark.json'
|
||||
import github from '@/assets/palettes/github.json'
|
||||
import light from '@/assets/palettes/light.json'
|
||||
import nord from '@/assets/palettes/nord.json'
|
||||
import solarized from '@/assets/palettes/solarized.json'
|
||||
import arc from '@/assets/palettes/arc.json' with { type: 'json' }
|
||||
import dark from '@/assets/palettes/dark.json' with { type: 'json' }
|
||||
import github from '@/assets/palettes/github.json' with { type: 'json' }
|
||||
import light from '@/assets/palettes/light.json' with { type: 'json' }
|
||||
import nord from '@/assets/palettes/nord.json' with { type: 'json' }
|
||||
import solarized from '@/assets/palettes/solarized.json' with { type: 'json' }
|
||||
import type {
|
||||
ColorPalettes,
|
||||
CompletedPalette
|
||||
|
||||
Reference in New Issue
Block a user