@@ -48,27 +48,7 @@ function esmConfig() {
48
48
] ;
49
49
50
50
return {
51
- onLog ( level , log , handler ) {
52
- switch ( log . code ) {
53
- case 'CIRCULAR_DEPENDENCY' :
54
- if ( log . ids . some ( ( id ) => id . includes ( 'node_modules/rsvp/lib/rsvp' ) ) ) {
55
- // rsvp has some internal cycles but they don't bother us
56
- return ;
57
- }
58
- process . stderr . write (
59
- `Circular dependency:\n${ log . ids . map ( ( id ) => ' ' + id ) . join ( '\n' ) } \n`
60
- ) ;
61
- throw new Error ( `Circular dependencies are forbidden` ) ;
62
- case 'EMPTY_BUNDLE' :
63
- // Some of our entrypoints are type-only and result in empty bundles.
64
- // We prune the actual empty files elsewhere in this config (see
65
- // pruneEmptyBundles). This silences the warning from rollup about
66
- // them.
67
- return ;
68
- default :
69
- handler ( level , log ) ;
70
- }
71
- } ,
51
+ onLog : handleRollupWarnings ,
72
52
input : {
73
53
...renameEntrypoints ( exposedDependencies ( ) , ( name ) => join ( 'packages' , name , 'index' ) ) ,
74
54
...renameEntrypoints ( packages ( ) , ( name ) => join ( 'packages' , name ) ) ,
@@ -126,6 +106,7 @@ function legacyBundleConfig(input, output, { isDeveloping, isExternal }) {
126
106
127
107
interop : 'esModule' ,
128
108
} ,
109
+ onLog : handleRollupWarnings ,
129
110
plugins : [
130
111
amdDefineSupport ( ) ,
131
112
...( isDeveloping ? [ concatenateAMDEntrypoints ( ) ] : [ ] ) ,
@@ -516,3 +497,25 @@ function pruneEmptyBundles() {
516
497
} ,
517
498
} ;
518
499
}
500
+
501
+ function handleRollupWarnings ( level , log , handler ) {
502
+ switch ( log . code ) {
503
+ case 'CIRCULAR_DEPENDENCY' :
504
+ if ( log . ids . some ( ( id ) => id . includes ( 'node_modules/rsvp/lib/rsvp' ) ) ) {
505
+ // rsvp has some internal cycles but they don't bother us
506
+ return ;
507
+ }
508
+ process . stderr . write (
509
+ `Circular dependency:\n${ log . ids . map ( ( id ) => ' ' + id ) . join ( '\n' ) } \n`
510
+ ) ;
511
+ throw new Error ( `Circular dependencies are forbidden` ) ;
512
+ case 'EMPTY_BUNDLE' :
513
+ // Some of our entrypoints are type-only and result in empty bundles.
514
+ // We prune the actual empty files elsewhere in this config (see
515
+ // pruneEmptyBundles). This silences the warning from rollup about
516
+ // them.
517
+ return ;
518
+ default :
519
+ handler ( level , log ) ;
520
+ }
521
+ }
0 commit comments