Skip to content

Commit

Permalink
Also emit a .d.cts file
Browse files Browse the repository at this point in the history
Since TypeScript will complain if we try to use a single file for both ESM and CJS

Issue ProseMirror/prosemirror#1305
  • Loading branch information
marijnh committed May 17, 2023
1 parent 5b87c53 commit 4f3c12c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/buildtool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ async function bundle(pkg: Package, compiled: Output, options: BuildOptions) {
format: "esm",
file: join(dist, "index.d.ts")
})
await emit(tscBundle, {
format: "esm",
file: join(dist, "index.d.cts")
})
}

function allDirs(pkgs: readonly Package[]) {
Expand Down

0 comments on commit 4f3c12c

Please sign in to comment.