From de618ff615874eed5ef7a27b9cc8750ac2b512ed Mon Sep 17 00:00:00 2001 From: Otto G Date: Sun, 8 May 2022 18:01:19 +0200 Subject: [PATCH] fix: Parameter Decorator bug in ts Using the old "decorators" plugin config was preventing import-cost to parse decorators in class constructors parameters. Followed babel guidelines to replace the old plugin by the latest `decorators-legacy` --- packages/import-cost/src/babel-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/import-cost/src/babel-parser.js b/packages/import-cost/src/babel-parser.js index 06ec1d7..f687663 100644 --- a/packages/import-cost/src/babel-parser.js +++ b/packages/import-cost/src/babel-parser.js @@ -10,7 +10,7 @@ const PARSE_PLUGINS = [ 'doExpressions', 'trailingFunctionCommas', 'objectRestSpread', - ['decorators', { decoratorsBeforeExport: true }], + 'decorators-legacy', 'classProperties', 'exportExtensions', 'exponentiationOperator',