From 54aef4fe1d1a8aa47fa381067d2c192b7ee9f4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 15 Nov 2025 16:09:26 +0800 Subject: [PATCH] Update main entry and tsconfig for JS support Changed package.json main and exports to use index.js instead of index.cjs. Updated tsconfig.json to allow JavaScript files and expanded include patterns to support both JS and TS files. --- packages/napcat-develop/package.json | 4 ++-- packages/napcat-develop/tsconfig.json | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/napcat-develop/package.json b/packages/napcat-develop/package.json index 22890afa..c769c2c9 100644 --- a/packages/napcat-develop/package.json +++ b/packages/napcat-develop/package.json @@ -3,13 +3,13 @@ "version": "0.0.1", "private": true, "type": "module", - "main": "index.cjs", + "main": "index.js", "scripts": { "dev": "powershell ./nodeTest.ps1" }, "exports": { ".": { - "require": "./index.cjs" + "require": "./index.js" }, "./*": { "require": "./*" diff --git a/packages/napcat-develop/tsconfig.json b/packages/napcat-develop/tsconfig.json index c498219a..3b90685f 100644 --- a/packages/napcat-develop/tsconfig.json +++ b/packages/napcat-develop/tsconfig.json @@ -1,7 +1,14 @@ { "extends": "../../tsconfig.base.json", + "compilerOptions": { + "allowJs": true + }, "include": [ - "**/*.cjs" + "*.cjs", + "**/*.cjs", + "**/*.ts", + "*.js", + "**/*.js" ], "exclude": [ "node_modules",