Skip to content

Commit

Permalink
Enhancement for best practice prop types. (#70)
Browse files Browse the repository at this point in the history
* Fixes #69: Adding capability to reduce production build output size and
allow users that import this package to include prop types in
development and optionally remove them using Webpacks UglifyJS + Define
plugin.

* Updated .babelrc that properly wraps prop-types.

* Restoring the original constant declaration for prop types as uglify
does find dead code and remove it.

* Updating changelog.
  • Loading branch information
virgofx authored and jquense committed Jun 12, 2017
1 parent b54588a commit 6ffd0e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .babelrc
Expand Up @@ -9,6 +9,7 @@
"plugins": [
"dev-expression",
"add-module-exports",
"transform-object-assign"
"transform-object-assign",
["transform-react-remove-prop-types", { mode: "wrap" }]
],
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,16 +2,24 @@
> 2017-XX-XX
- **Feature:** Dist build now includes both production and development builds ([#64])
- **Feature:** PropTypes are now wrapped allowing for lighter weight production builds ([#69])

[#64]: https://github.com/reactjs/react-transition-group/issues/64
[#69]: https://github.com/reactjs/react-transition-group/issues/69
[v1.1.X]: https://github.com/reactjs/react-transition-group/compare/v1.1.3...master

## [v1.1.3]
> 2017-05-02
- bonus release, no additions

[v1.1.3]: https://github.com/reactjs/react-transition-group/compare/v1.1.2...v1.1.3

## [v1.1.2]
> 2017-05-02
- **Bugfix:** Fix refs on children ([#39])

[v1.1.2]: https://github.com/reactjs/react-transition-group/compare/v1.1.1...v1.1.2
[#39]: https://github.com/reactjs/react-transition-group/pull/39

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -57,6 +57,7 @@
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.5",
"babel-preset-latest": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-2": "^6.18.0",
Expand Down

0 comments on commit 6ffd0e2

Please sign in to comment.