We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd79b8 commit c21d5e2Copy full SHA for c21d5e2
1 file changed
express-zod-api/tsdown.config.ts
@@ -1,14 +1,12 @@
1
import { defineConfig } from "tsdown";
2
-import { readFile } from "node:fs/promises";
3
-
4
-const { version } = JSON.parse(await readFile("./package.json", "utf8"));
+import manifest from "./package.json" with { type: "json" };
5
6
export default defineConfig({
7
entry: "src/index.ts",
8
minify: true,
9
attw: { profile: "esmOnly", level: "error" },
10
define: {
11
- "process.env.TSDOWN_BUILD": `"v${version}"`, // @since v25.0.0 is pure ESM
+ "process.env.TSDOWN_BUILD": `"v${manifest.version}"`, // @since v25.0.0 is pure ESM
12
"process.env.TSDOWN_STATIC": `"static"`, // used by isProduction()
13
},
14
});
0 commit comments