🚧 halfway working on esm fix

This commit is contained in:
zS1L3NT Mac 2024-05-14 23:09:32 +08:00
parent 939ef8f3b1
commit 68aed894d4
No known key found for this signature in database
GPG Key ID: 02BE07CD431E4F42
3 changed files with 28 additions and 13 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -1,17 +1,29 @@
{
"name": "ytmusic-api",
"version": "5.2.1",
"version": "5.2.2-alpha.7",
"description": "YouTube Music API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"files": [
"dist"
],
"author": "zS1L3NT <dev@zectan.com> (http://www.zectan.com)",
"license": "GPL-3.0",
"repository": {
"type": "git",
"url": "https://github.com/zS1L3NT/ts-npm-ytmusic-api"
},
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
}
},
"scripts": {
"build": "tsc && rm tsconfig.tsbuildinfo",
"build": "tsup src/index.ts --dts --format cjs,esm --clean --out-dir dist",
"clean": "tsc --noEmit && eslint src --fix && prettier src --write && rm tsconfig.tsbuildinfo"
},
"dependencies": {
@ -28,6 +40,7 @@
"eslint-config-prettier": "latest",
"eslint-plugin-simple-import-sort": "latest",
"prettier": "latest",
"tsup": "^8.0.2",
"typescript": "latest"
},
"keywords": [

View File

@ -3,16 +3,17 @@
/** Transpiler */
"target": "esnext",
"lib": ["esnext"],
"module": "commonjs",
"module": "esnext",
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
/** Project */
"rootDir": "src",
"outDir": "dist",
"outDir": "dist/esm",
"types": ["bun-types"],
"declaration": true,
"declarationDir": "dist/types",
/** Type Checking */
"strict": true,
@ -31,12 +32,13 @@
"forceConsistentCasingInFileNames": true,
/** Other */
"noEmit": false,
"allowJs": true,
"jsx": "react-jsx",
"skipLibCheck": true,
"isolatedModules": true,
"incremental": true
// "noEmit": false,
// "allowJs": true,
// "jsx": "react-jsx",
// "skipLibCheck": true,
// "isolatedModules": true,
// "incremental": true
},
"include": ["src", "src/tests"]
"include": ["src"],
"exclude": ["src/tests"]
}