diff --git a/index.ts b/index.ts index 1b19972..cb61b7a 100644 --- a/index.ts +++ b/index.ts @@ -27,6 +27,7 @@ export interface Options { files?: string[]; exclude?: string[]; externs?: string[]; + declaredExternalModules?: string[]; types?: string[]; eol?: string; includes?: string[]; @@ -335,6 +336,14 @@ export default function generate(options: Options): Promise { }); }); + if (options.declaredExternalModules) { + options.declaredExternalModules.forEach(module => { + if (!declaredExternalModules.includes(module)) { + declaredExternalModules.push(module); + } + }); + } + program.getSourceFiles().some(function (sourceFile) { // Source file is a default library, or other dependency from another project, that should not be included in // our bundled output