distribute .d.ts files

This commit is contained in:
itsMapleLeaf
2023-10-10 10:47:31 -05:00
parent 37b75a99e2
commit ced48a3ecb
2 changed files with 10 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
---
"reacord": patch
---
distribute d.ts files again instead of the source
distributing the source causes typecheck errors when the modules it imports from (in this case, `@reacord/helpers`) don't exist in the end users' projects, so we'll just distribute d.ts files instead like normal. failed experiment :(

View File

@@ -19,17 +19,16 @@
"reacord" "reacord"
], ],
"files": [ "files": [
"library",
"dist", "dist",
"README.md", "README.md",
"LICENSE" "LICENSE"
], ],
"types": "./library/main.ts", "types": "./dist/main.d.ts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/main.js", "import": "./dist/main.js",
"require": "./dist/main.cjs", "require": "./dist/main.cjs",
"types": "./library/main.ts" "types": "./dist/main.d.ts"
}, },
"./package.json": { "./package.json": {
"import": "./package.json", "import": "./package.json",
@@ -37,7 +36,7 @@
} }
}, },
"scripts": { "scripts": {
"build": "cpy ../../README.md ../../LICENSE . && tsup library/main.ts --target node16 --format cjs,esm --sourcemap", "build": "cpy ../../README.md ../../LICENSE . && tsup library/main.ts --target node16 --format cjs,esm --sourcemap --dts --dts-resolve",
"build-watch": "pnpm build -- --watch", "build-watch": "pnpm build -- --watch",
"test": "vitest --coverage --no-watch", "test": "vitest --coverage --no-watch",
"test-dev": "vitest", "test-dev": "vitest",