fp/services/capture/tsup.config.ts

30 lines
754 B
TypeScript
Raw Normal View History

2024-07-19 08:01:06 +00:00
import { defineConfig } from "tsup";
import { exec } from 'child_process';
export default defineConfig({
2024-07-23 02:59:41 +00:00
entry: [
"src/index.ts",
"src/tasks/**.ts"
],
format: ["esm"],
2024-07-19 08:01:06 +00:00
target: "node20",
clean: true,
sourcemap: true,
/**
2024-07-23 02:59:41 +00:00
* These packages are using the internal packages approach, so it needs to
2024-07-19 08:01:06 +00:00
* be transpiled / bundled together with the deployed code.
*/
2024-07-23 02:59:41 +00:00
noExternal: [
"@futureporn/utils",
"@futureporn/scout",
"@futureporn/types",
],
2024-07-19 08:01:06 +00:00
/**
* 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');
},
});