-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
30 lines (29 loc) · 771 Bytes
/
Copy pathtsup.config.ts
File metadata and controls
30 lines (29 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* tsup.config.ts
* --------------
*
* Build configuration for `@arraypress/waveform-playlist-react`.
*
* Outputs:
* - dist/index.js (ESM) — for modern bundlers and Node `import`
* - dist/index.cjs (CJS) — for older toolchains and Node `require`
* - dist/index.d.ts — TypeScript declarations
*
* Externalises `react` and both `@arraypress/waveform-*` cores so they
* resolve to the consumer's installed copies, never bundled in.
*/
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
dts: true,
sourcemap: true,
clean: true,
treeshake: true,
external: [
'react',
'react-dom',
'@arraypress/waveform-playlist',
'@arraypress/waveform-player',
],
});