ESM-only build (#4227)

Co-authored-by: Link <link20050703@gmail.com>
This commit is contained in:
Fleny
2025-08-22 10:48:28 -07:00
committed by GitHub
co-authored by Link
parent 2d5e2114c7
commit bd37023847
10 changed files with 23 additions and 76 deletions
+3 -9
View File
@@ -1,13 +1,7 @@
{
"name": "@discordeno/bot",
"version": "21.0.0",
"main": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs"
},
"exports": "./dist/index.js",
"type": "module",
"license": "Apache-2.0",
"repository": {
@@ -19,8 +13,8 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist/esm && swc --strip-leading-paths --delete-dir-on-start src --out-dir dist/cjs -C module.type=commonjs && node ../../scripts/fixCjsExtension.js",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist/types",
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
"test:unit-coverage": "c8 mocha --no-warnings 'tests/unit/**/*.spec.ts'",