TXBOX - refactor: update package configuration and improve error handling
- Changed package.json to use "tsx" instead of "ts-node" for development. - Updated "@whiskeysockets/baileys" dependency to version 6.7.24. - Added error handling for unhandled rejections and uncaught exceptions in server.ts. - Implemented a reconnect mechanism for WhatsApp connection failures. - Updated tsconfig.json to use "NodeNext" module and resolution for ESM compatibility.
This commit is contained in:
+2
-1
@@ -26,7 +26,8 @@
|
||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
"module": "NodeNext", /* Specify what module code is generated. Required for ESM-only Baileys 6.7.x. */
|
||||
"moduleResolution": "NodeNext", /* Resolve modules the way Node.js ESM does. */
|
||||
"rootDir": "src", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
|
||||
Reference in New Issue
Block a user