From cf04dfc4f319585d2734a7eb141d9d6af4c28c2c Mon Sep 17 00:00:00 2001 From: Muhammad Fawwaz Orabi Date: Wed, 1 May 2019 10:35:32 +0300 Subject: [PATCH] Fix: add pure calls annotations for better tree shaking --- .babelrc | 1 + package.json | 1 + yarn.lock | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/.babelrc b/.babelrc index 7ee040d..c1bc5cf 100644 --- a/.babelrc +++ b/.babelrc @@ -11,6 +11,7 @@ "@babel/preset-typescript" ], "plugins": [ + "annotate-pure-calls", "date-fns", [ "transform-imports", diff --git a/package.json b/package.json index c757e02..5d92775 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@types/stylelint": "^9.4.2", "@typescript-eslint/eslint-plugin": "^1.4.2", "@typescript-eslint/parser": "^1.4.2", + "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-date-fns": "^0.2.1", "babel-plugin-transform-imports": "^1.5.1", "eslint": "^5.15.1", diff --git a/yarn.lock b/yarn.lock index 9fcdf74..b04acf3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1719,6 +1719,11 @@ axobject-query@^2.0.2: dependencies: ast-types-flow "0.0.7" +babel-plugin-annotate-pure-calls@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/babel-plugin-annotate-pure-calls/-/babel-plugin-annotate-pure-calls-0.4.0.tgz#78aa00fd878c4fcde4d49f3da397fcf5defbcce8" + integrity sha512-oi4M/PWUJOU9ZyRGoPTfPMqdyMp06jbJAomd3RcyYuzUtBOddv98BqLm96Lucpi2QFoQHkdGQt0ACvw7VzVEQA== + babel-plugin-date-fns@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/babel-plugin-date-fns/-/babel-plugin-date-fns-0.2.1.tgz#17b6e4666a05411857ac04af4318ff5fb72895f2"