From 681229296d12f3ab7a91b306f6d3513682dc9f3b Mon Sep 17 00:00:00 2001 From: lijialiang Date: Fri, 12 Aug 2022 14:35:37 +0800 Subject: [PATCH] fix: detectiveConfig.includeCore doesn't work. --- index.js | 1 - lib/Config.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 54b16b2..33bceef 100644 --- a/index.js +++ b/index.js @@ -84,7 +84,6 @@ module.exports.toList = function(options) { module.exports._getDependencies = function(config) { let dependencies; const precinctOptions = config.detectiveConfig; - precinctOptions.includeCore = false; try { dependencies = precinct.paperwork(config.filename, precinctOptions); diff --git a/lib/Config.js b/lib/Config.js index 4be5d58..b20b0c6 100644 --- a/lib/Config.js +++ b/lib/Config.js @@ -13,7 +13,7 @@ class Config { this.requireConfig = options.config || options.requireConfig; this.webpackConfig = options.webpackConfig; this.nodeModulesConfig = options.nodeModulesConfig; - this.detectiveConfig = options.detective || options.detectiveConfig || {}; + this.detectiveConfig = options.detective || options.detectiveConfig || { includeCore: false }; this.tsConfig = options.tsConfig; this.noTypeDefinitions = options.noTypeDefinitions;