-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpkgroll.config.ts
More file actions
33 lines (32 loc) · 879 Bytes
/
pkgroll.config.ts
File metadata and controls
33 lines (32 loc) · 879 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
31
32
33
import { defineConfig } from 'pkgroll';
export default defineConfig({
external: [
'music-metadata',
'readable-web-to-node-stream',
'readable-stream'
],
rollup: {
onLog(level, log, handler) {
// Filter out circular dependency warnings from node_modules
if (log.code === 'CIRCULAR_DEPENDENCY') {
const message = log.message || '';
if (message.includes('node_modules')) {
return;
}
}
// Pass through all other logs
handler(level, log);
},
onwarn(warning, warn) {
// Suppress circular dependency warnings from third-party packages
if (warning.code === 'CIRCULAR_DEPENDENCY') {
const message = warning.message || '';
if (message.includes('node_modules')) {
return;
}
}
// Show all other warnings
warn(warning);
}
}
});