forked from akash-network/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
23 lines (20 loc) · 957 Bytes
/
tsup.config.ts
File metadata and controls
23 lines (20 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { applyDefaults, copyDrizzlePlugin } from "@akashnetwork/dev-config/tsup-plugins.ts";
import { fileURLToPath } from "node:url";
import { defineConfig } from "tsup";
import packageJson from "./package.json";
import tsconfig from "./tsconfig.build.json";
const isProduction = process.env.NODE_ENV === "production";
export default defineConfig(async overrideOptions =>
applyDefaults({
packageJson,
prependEffectsToEntries: ["reflect-metadata", "@akashnetwork/env-loader"],
entry: { index: "./src/index.ts", instrumentation: fileURLToPath(import.meta.resolve("@akashnetwork/instrumentation/register")) },
target: tsconfig.compilerOptions.target,
tsconfig: "tsconfig.build.json",
external: ["pino-pretty"],
dts: false,
plugins: [...(isProduction ? [copyDrizzlePlugin] : [])],
onSuccess: overrideOptions.watch && !isProduction ? "node --enable-source-maps dist/index.js" : undefined,
...overrideOptions
})
);