From 417e5becf12554d9fc7af9a32ecc6bc860ead123 Mon Sep 17 00:00:00 2001 From: Matt Browne Date: Thu, 3 Oct 2019 16:44:36 -0400 Subject: [PATCH] added deprecation notice --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3449763..82875eb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # babel-plugin-pure-static-props +## DEPRECATED + +This plugin is deprecated in favor of https://github.com/styled-components/babel-plugin-styled-components/pull/248. +It's possible that something other than styled-components might cause a similar issue, in which case this plugin might still be useful, but I won't be maintaining it. (Also, my implementation for babel-plugin-styled-components is a bit more efficient than what I did here.) + +--- + Fixes an issue with tree shaking that can occur when using static properties on React components using styled-components. This plugin replaces static property assignments on React components (e.g. `MyComponent.defaultProps = {...}`) with `Object.assign()` statements annotated with `/*#__PURE__*/` comments so that tree-shaking will work correctly.