-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add babel-plugin-transform-react-remove-prop-types #14814
Comments
Sounds useful but I'm not entirely sure if we should add it in our default config (which is super lightweight by design). Let's keep this open and hear what everyone else has to say. In the mean time, you could add this in a custom .babelrc file |
Just spoke with @DSchau about this and we both agree that this is useful indeed! We would love to accept a PR with this. 💪 |
Hi, Can I try to tackle this one? Cheers |
@luisFilipePT Sure! Thank you for picking it up 🙌 |
@luisFilipePT You should be able to add it to babel-preset-gatsby/src/index.js |
@wardpeet thanks for the tip 👍 1 - Added the npm package in Am I on the right path? 😄 No luck yet :/ PS - The goal here, for now, is just to remove propTypes on Gatsby prod but not on the plugins, right? Thanks guys |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
@luisFilipePT how is this going? I might be able to help you out |
I think it's done. You can check the PR and see if theres anything that could be improved. |
Plan is to merge this today (we are doing bunch of babel preset related changes) |
…op-types for production builds (#14987) * feat(babel-preset-gatsby): Add babel-plugin-transform-react-remove-prop-types to babel-preset-gatsby Remove PropTypes from production build re #14814 * docs(babel-preset-gatsby): Add babel-plugin-transform-react-remove-prop-types link to README in #pac re #14814 * test(babel-preset-gatsby): Add test - in production mode specifies proper presets #14814 * fix(babel-preset-gatsby): Remove core-js package from package.json installed when developing but nev #14814 * refactor(babel-preset-gatsby): Use GATSBY_BUILD_STAGE in place of BABEL_ENV || NODE_ENV #14814 * test(babel-preset-gatsby): Remove beforeEach in tests on production env #14814 * update lock file * update tests * fixup after merge conflict resolution/small refactor
Summary
I am not 100% sure, but it seems like
babel-plugin-transform-react-remove-prop-types
isn't being used when gatsby is building for production.In my opinion, this is a very useful and practical thing to add.
Basic example
N/A
Motivation
To achieve smaller production build bundle.
The text was updated successfully, but these errors were encountered: