-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbunup.config.ts
More file actions
42 lines (31 loc) · 1 KB
/
bunup.config.ts
File metadata and controls
42 lines (31 loc) · 1 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig } from 'bunup'
export default defineConfig({
// Externalize Zod to avoid bundling it (it's a dependency)
packages: 'external',
// Disable code splitting to avoid CommonJS helpers that break in Workers
splitting: false,
// Enable minification for production builds
minify: true,
// Generate linked source maps for debugging
sourcemap: 'linked',
// TypeScript declaration options
dts: {
// Enable type inference to handle isolatedDeclarations
inferTypes: true,
// Disable declaration splitting to avoid module resolution issues
splitting: false,
// Minify declaration files to reduce size
minify: true,
},
// Build report configuration
report: {
// Enable gzip size calculation (default: true)
gzip: true,
// Enable brotli size calculation for better compression metrics
brotli: true,
// Warn if any bundle exceeds 500KB (reasonable for a types library)
maxBundleSize: 500 * 1024,
},
// Automatically generate and sync package.json exports
exports: true,
})