Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/api-extractor > IConfigFile > bundledPackages

IConfigFile.bundledPackages property

A list of NPM package names whose exports should be treated as part of this package.


bundledPackages?: string[];


For example, suppose that Webpack is used to generate a distributed bundle for the project library1, and another NPM package library2 is embedded in this bundle. Some types from library2 may become part of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly imports library2. To avoid this, we can specify:

  "bundledPackages": [ "library2" ],

This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been local files for library1.