@@ -5,7 +5,6 @@ import { bundle } from '../utils/build-utils';
5
5
import { getPackageInfo , PackageInfo } from '../utils/package-info' ;
6
6
import { SharedInfo } from '@softarc/native-federation-runtime' ;
7
7
import { FederationOptions } from './federation-options' ;
8
- import { DEFAULT_SKIP_LIST } from './default-skip-list' ;
9
8
import { copySrcMapIfExists } from '../utils/copy-src-map-if-exists' ;
10
9
11
10
export async function bundleShared (
@@ -14,9 +13,8 @@ export async function bundleShared(
14
13
externals : string [ ]
15
14
) : Promise < Array < SharedInfo > > {
16
15
const result : Array < SharedInfo > = [ ] ;
17
-
18
16
const packageInfos = Object . keys ( config . shared )
19
- . filter ( ( packageName ) => ! DEFAULT_SKIP_LIST . has ( packageName ) )
17
+ // .filter((packageName) => !isInSkipList (packageName, PREPARED_DEFAULT_SKIP_LIST ))
20
18
. map ( ( packageName ) => getPackageInfo ( packageName , fedOptions . workspaceRoot ) )
21
19
. filter ( ( pi ) => ! ! pi ) as PackageInfo [ ] ;
22
20
@@ -39,14 +37,21 @@ export async function bundleShared(
39
37
const cachedFile = path . join ( cachePath , outFileName ) ;
40
38
41
39
if ( ! fs . existsSync ( cachedFile ) ) {
42
- await bundle ( {
43
- entryPoint : pi . entryPoint ,
44
- tsConfigPath : fedOptions . tsConfig ,
45
- external : externals ,
46
- outfile : cachedFile ,
47
- mappedPaths : config . sharedMappings ,
48
- packageName : pi . packageName ,
49
- } ) ;
40
+ try {
41
+ await bundle ( {
42
+ entryPoint : pi . entryPoint ,
43
+ tsConfigPath : fedOptions . tsConfig ,
44
+ external : externals ,
45
+ outfile : cachedFile ,
46
+ mappedPaths : config . sharedMappings ,
47
+ packageName : pi . packageName ,
48
+ } ) ;
49
+ }
50
+ catch ( e ) {
51
+ console . error ( 'Error bundling' , pi . packageName ) ;
52
+ console . info ( `If you don't need this package, skip it in your federation.config.js!` ) ;
53
+ continue ;
54
+ }
50
55
}
51
56
52
57
const shared = config . shared [ pi . packageName ] ;
0 commit comments