@@ -95,6 +95,7 @@ interface IExtractorConfigParameters {
9595 packageJson : INodePackageJson | undefined ;
9696 packageFolder : string | undefined ;
9797 mainEntryPointFilePath : string ;
98+ bundledPackages : string [ ] ;
9899 tsconfigFilePath : string ;
99100 overrideTsconfig : { } | undefined ;
100101 skipLibCheck : boolean ;
@@ -153,6 +154,9 @@ export class ExtractorConfig {
153154 /** {@inheritDoc IConfigFile.mainEntryPointFilePath } */
154155 public readonly mainEntryPointFilePath : string ;
155156
157+ /** {@inheritDoc IConfigFile.bundledPackages } */
158+ public readonly bundledPackages : string [ ] ;
159+
156160 /** {@inheritDoc IConfigCompiler.tsconfigFilePath } */
157161 public readonly tsconfigFilePath : string ;
158162
@@ -202,6 +206,7 @@ export class ExtractorConfig {
202206 this . packageJson = parameters . packageJson ;
203207 this . packageFolder = parameters . packageFolder ;
204208 this . mainEntryPointFilePath = parameters . mainEntryPointFilePath ;
209+ this . bundledPackages = parameters . bundledPackages ;
205210 this . tsconfigFilePath = parameters . tsconfigFilePath ;
206211 this . overrideTsconfig = parameters . overrideTsconfig ;
207212 this . skipLibCheck = parameters . skipLibCheck ;
@@ -543,6 +548,13 @@ export class ExtractorConfig {
543548 throw new Error ( 'The "mainEntryPointFilePath" path does not exist: ' + mainEntryPointFilePath ) ;
544549 }
545550
551+ const bundledPackages : string [ ] = configObject . bundledPackages || [ ] ;
552+ for ( const bundledPackage of bundledPackages ) {
553+ if ( ! PackageName . isValidName ( bundledPackage ) ) {
554+ throw new Error ( `The "bundledPackages" list contains an invalid package name: "${ bundledPackage } "` ) ;
555+ }
556+ }
557+
546558 const tsconfigFilePath : string = ExtractorConfig . _resolvePathWithTokens ( 'tsconfigFilePath' ,
547559 configObject . compiler . tsconfigFilePath , tokenContext ) ;
548560
@@ -645,6 +657,7 @@ export class ExtractorConfig {
645657 packageJson,
646658 packageFolder,
647659 mainEntryPointFilePath,
660+ bundledPackages,
648661 tsconfigFilePath,
649662 overrideTsconfig : configObject . compiler . overrideTsconfig ,
650663 skipLibCheck : ! ! configObject . compiler . skipLibCheck ,
0 commit comments