oliviertassinari / babel-plugin-transform-react-remove-prop-types

Remove unnecessary React propTypes from the production build. :balloon:
MIT License
897 stars 61 forks source link

react-portal remove prop-types #170

Closed romanlex closed 6 years ago

romanlex commented 6 years ago

I'm use react-portal in my app and babel-plugin-transform-react-remove-prop-types But in production build of library I see imports of PropTypes

This is builded es version on Portal from node_modules image

In my umd or es build I see not removed prop-types(

oliviertassinari commented 6 years ago

@romanlex Babel doesn't travers de node_modules by default for efficiency concerns. You have different options:

romanlex commented 6 years ago

I removed exclude option in my babel config My babel compile all imports from node_modules