Skip to content
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

fix(babel-preset-gatsby): remove prop-types in production for dependencies #23609

Merged
merged 4 commits into from May 4, 2020

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Apr 29, 2020

Description

Apply babel-plugin-transform-react-remove-prop-types for dependencies (similar to how we do it in

stage === `build-javascript` && [
// Remove PropTypes from production build
resolve(`babel-plugin-transform-react-remove-prop-types`),
{
removeImport: true,
},
],
already for src and themes

This was mostly copy & paste from index.js file (with addition of passing stage option to this preset)

Related Issues

Discovered in #23550 (but doesn't fix it)

@pieh pieh requested a review from a team as a code owner April 29, 2020 20:35
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label May 4, 2020
@gatsbybot gatsbybot merged commit a844157 into master May 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the use-transform-react-remove-prop-types-for-deps branch May 4, 2020 18:04
@andy-law
Copy link

Is there a way to disable this either for a whole build or specifically for node_modules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants