fix: add import assertion for JSON imports in ESM
Adds 'with { type: "json" }' to JSON imports to fix Node.js ESM runtime error:
ERR_IMPORT_ATTRIBUTE_MISSING
This commit is contained in:
@@ -4,7 +4,7 @@ import type { AuthenticationState, SocketConfig, WAVersion } from '../Types'
|
||||
import { Browsers } from '../Utils/browser-utils'
|
||||
import logger from '../Utils/logger'
|
||||
// Single source of truth for WhatsApp Web version - imported from JSON
|
||||
import baileysVersionData from './baileys-version.json'
|
||||
import baileysVersionData from './baileys-version.json' with { type: 'json' }
|
||||
|
||||
const version = baileysVersionData.version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user