Skip to content

Commit 202e0bb

Browse files
committed
REF: using dts banner and a separate entrypoint for augmentation.
1 parent 305ff1e commit 202e0bb

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

zod-plugin/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "./augmentation.d.ts";
21
import "./runtime"; // side effects here
32
export { pack, unpack } from "./packer";
43
export { getBrand } from "./brand";

zod-plugin/tsdown.config.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
import { defineConfig } from "tsdown";
22

3-
export default defineConfig({
4-
entry: ["index.ts"],
5-
minify: true,
6-
attw: { profile: "esmOnly", level: "error" },
7-
});
3+
export default defineConfig([
4+
{
5+
entry: ["index.ts"],
6+
minify: true,
7+
attw: { profile: "esmOnly", level: "error" },
8+
banner: {
9+
dts: "import './augmentation.js';",
10+
},
11+
},
12+
{
13+
entry: ["augmentation.ts"],
14+
dts: { emitDtsOnly: true },
15+
},
16+
]);

0 commit comments

Comments
 (0)