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.
This commit is contained in:
手瓜一十雪 2025-11-15 16:09:26 +08:00
parent ef63812391
commit 1990761ad6
2 changed files with 10 additions and 3 deletions

View File

@ -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": "./*"

View File

@ -1,7 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true
},
"include": [
"**/*.cjs"
"*.cjs",
"**/*.cjs",
"**/*.ts",
"*.js",
"**/*.js"
],
"exclude": [
"node_modules",