From 63c0077e322f425326602285efd18352442e1f1b Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 4 May 2021 20:25:27 -0400 Subject: [PATCH] Allow `--no-generate-types` option --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);