diff --git a/src/index.js b/src/index.js index 3de28e9e..6b907603 100644 --- a/src/index.js +++ b/src/index.js @@ -366,7 +366,7 @@ function createConfig(options, entry, format, writeMeta) { : () => resolve(options.cwd, 'mangle.json'); const useTypescript = extname(entry) === '.ts' || extname(entry) === '.tsx'; - const emitDeclaration = !!(options.generateTypes || pkg.types || pkg.typings); + const emitDeclaration = options.generateTypes !== false && !!(pkg.types || pkg.typings); const escapeStringExternals = ext => ext instanceof RegExp ? ext.source : escapeStringRegexp(ext);