Skip to content

Commit

Permalink
Generate .d.cts file by copying over .d.ts
Browse files Browse the repository at this point in the history
This is supposed to work according to `npx publint`:
> 1. pkg.exports["."].require types is not exported. Consider adding
> pkg.exports["."].require.types to be compatible with TypeScript's
> "moduleResolution": "bundler" compiler option. Note that you cannot
> use "./dist/index.d.ts" because it has a mismatching format. Instead,
> you can duplicate the file and use the .cts extension,
> e.g. pkg.exports["."].require.types: "./dist/index.d.cts"
  • Loading branch information
Philzen committed Dec 11, 2024
1 parent 20c36df commit b5d562a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/livekit-server-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"src"
],
"scripts": {
"build": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
"build": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly && cp ./dist/index.d.ts ./dist/index.d.cts\"",
"build:watch": "tsc --watch",
"build-docs": "typedoc",
"changeset": "changeset",
Expand Down

0 comments on commit b5d562a

Please sign in to comment.