forked from ASTROIDX556/astroid-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.base.ts
More file actions
23 lines (22 loc) · 767 Bytes
/
Copy pathtsup.base.ts
File metadata and controls
23 lines (22 loc) · 767 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 { defineConfig, type Options } from 'tsup';
/**
* Shared tsup preset for every package in the Astroid SDK monorepo.
*
* Workspace dependencies (`@astroid/*`) and declared peer dependencies are kept
* external so each package stays thin and installs resolve through the pnpm
* workspace symlinks. Build order is topological (pnpm -r), so a package's
* dependencies are always compiled — with their `.d.ts` — before it builds.
*/
export function astroidTsup(overrides: Partial<Options> = {}): ReturnType<typeof defineConfig> {
return defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
dts: true,
sourcemap: true,
clean: true,
treeshake: true,
target: 'es2022',
outDir: 'dist',
...overrides,
});
}