-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prop-types source is included in dist builds #943
Comments
Probably want to throw in https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types in prod mode. |
I'm cool with that. I'll check into it for the next release. |
Unfortunately For my library I've done a little hack that works well, but I would be reluctant to recommend it to everyone: |
This will be fixed once we do our next release. |
Hello @timdorr I know, this is quite old issue, but it should be reopened, as I think.
are still in a file. What do you think, if we just wrap prop types to NODE_ENV check like this:
So, prop-types will be removed from prod build in that case. |
@artem-malko there are ways to automatically remove them without polluting code. See my last comment with config examples. You can do it yourself for your prod app build |
@nkbt ok, thx) But I can not understand, why do we need prop-types in prod code? |
@artem-malko I know, right! After all that was me who opened the issue :) |
It would be nice to have source of
prop-types
removed from dist. Especially minified versionThis helps: https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types
In non-minified build
node_modules/react-redux/dist/react-redux.js
In minified build
node_modules/react-redux/dist/react-redux.min.js
The text was updated successfully, but these errors were encountered: