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

Strip custom prop-types in production #448

Merged
merged 2 commits into from
Jan 14, 2019
Merged

Strip custom prop-types in production #448

merged 2 commits into from
Jan 14, 2019

Conversation

TrySound
Copy link
Contributor

Minified size with bundled dependencies before
17.53 KB
After
16.66 KB

Minified size with bundled dependencies before
17.53 KB
After
16.66 KB
Copy link
Collaborator

@jquense jquense left a comment

Choose a reason for hiding this comment

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

Lgtm, I'm assuming the direct assignment to .propTypes is because the Babel plugin doesn't strip them otherwise?

@TrySound
Copy link
Contributor Author

Yep

@TrySound
Copy link
Contributor Author

@jquense Is this good now?

@jquense jquense merged commit 46fa20f into reactjs:master Jan 14, 2019
jquense pushed a commit that referenced this pull request Jan 14, 2019
## [2.5.3](v2.5.2...v2.5.3) (2019-01-14)

### Bug Fixes

* strip custom prop-types in production ([#448](#448)) ([46fa20f](46fa20f))
@jquense
Copy link
Collaborator

jquense commented Jan 14, 2019

🎉 This PR is included in version 2.5.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@TrySound TrySound deleted the strip-prop-types branch January 14, 2019 16:30
@oliviertassinari
Copy link
Contributor

@jquense
Copy link
Collaborator

jquense commented Jan 14, 2019

hmm we are still including the prop-types library tho. seems like the import isn't getting stripped

@oliviertassinari
Copy link
Contributor

@jquense It's not. I wish the babel plugin was doing such.

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Jan 14, 2019

It's another gain potential. https://bundlephobia.com/result?p=prop-types@15.6.2. However, I'm not sure how we can make it work with ESM modules. Conditionally importing modules? 🤔.

@TrySound
Copy link
Contributor Author

It's because of old context api I guess

errendir added a commit to errendir/react-transition-group that referenced this pull request Feb 14, 2019
…d-compatible

* origin/master:
  chore: bundle UMD with rollup (reactjs#449)
  chore(release): 2.5.3 [skip ci]
  fix: strip custom prop-types in production (reactjs#448)
  chore: fix storybook (reactjs#445)
  chore(release): 2.5.2 [skip ci]
  fix: pass appear to CSSTransition callbacks (reactjs#441)
  docs: Fix type declaration comment (reactjs#439)
  chore(release): 2.5.1 [skip ci]
  fix: prevent calling setState in TransitionGroup if it has been unmounted (reactjs#435)
errendir added a commit to errendir/react-transition-group that referenced this pull request Feb 14, 2019
…d-compatible

* origin/master:
  chore: bundle UMD with rollup (reactjs#449)
  chore(release): 2.5.3 [skip ci]
  fix: strip custom prop-types in production (reactjs#448)
  chore: fix storybook (reactjs#445)
  chore(release): 2.5.2 [skip ci]
  fix: pass appear to CSSTransition callbacks (reactjs#441)
  docs: Fix type declaration comment (reactjs#439)
  chore(release): 2.5.1 [skip ci]
  fix: prevent calling setState in TransitionGroup if it has been unmounted (reactjs#435)
johnfrench3 pushed a commit to johnfrench3/transition-group-react that referenced this pull request Nov 2, 2022
## [2.5.3](reactjs/react-transition-group@v2.5.2...v2.5.3) (2019-01-14)

### Bug Fixes

* strip custom prop-types in production ([#448](reactjs/react-transition-group#448)) ([46fa20f](reactjs/react-transition-group@46fa20f))
patrickm68 added a commit to patrickm68/react-transition-group-developer that referenced this pull request Dec 1, 2022
## [2.5.3](reactjs/react-transition-group@v2.5.2...v2.5.3) (2019-01-14)

### Bug Fixes

* strip custom prop-types in production ([#448](reactjs/react-transition-group#448)) ([46fa20f](reactjs/react-transition-group@46fa20f))
shaikdev2 pushed a commit to shaikdev2/transition-group-react that referenced this pull request Jun 9, 2023
## [2.5.3](reactjs/react-transition-group@v2.5.2...v2.5.3) (2019-01-14)

### Bug Fixes

* strip custom prop-types in production ([#448](reactjs/react-transition-group#448)) ([46fa20f](reactjs/react-transition-group@46fa20f))
GreenCat1996 added a commit to GreenCat1996/react-transition-group that referenced this pull request Aug 1, 2023
## [2.5.3](reactjs/react-transition-group@v2.5.2...v2.5.3) (2019-01-14)

### Bug Fixes

* strip custom prop-types in production ([#448](reactjs/react-transition-group#448)) ([46fa20f](reactjs/react-transition-group@46fa20f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants