fp/packages/capture/tsup.config.ts

30 lines
754 B
TypeScript

import { defineConfig } from "tsup";
import { exec } from 'child_process';
export default defineConfig({
entry: [
"src/index.ts",
"src/tasks/**.ts"
],
format: ["esm"],
target: "node20",
clean: true,
sourcemap: true,
/**
* These packages are using the internal packages approach, so it needs to
* be transpiled / bundled together with the deployed code.
*/
noExternal: [
"@futureporn/utils",
"@futureporn/scout",
"@futureporn/types",
],
/**
* We do not use tsup for generating d.ts files because it can not generate type
* the definition maps required for go-to-definition to work in our IDE. We
* use tsc for that.
*/
onSuccess: async () => {
exec('tsc --emitDeclarationOnly');
},
});