-
Notifications
You must be signed in to change notification settings - Fork 516
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
chore(build): remove PropTypes from builds #3697
Conversation
Deploy preview for instantsearchjs ready! Built with commit 158c432 |
cb17350
to
a83757c
Compare
Although the UMD is a bit smaller, the GZIP version seems to be a be bigger according to Bundlesize. |
Did you look at the bundles themselves? It might just be decreased repetition. When looking with @tkrugg earlier I saw some more unexpected dependencies in the bundle |
Yes, the bundles look fine regarding PropTypes. From what I understand, the only remaining PropTypes are the ones part of Preact internals. |
It looks like the |
@samouss You mean in |
@francoischalifour Yes. You want to merge even with the size increase? |
I'm not exactly sure of the Bundlesize report but this is the actual result: after this PR, the bundle is slightly lighter. Before the change
After the change
|
a83757c
to
158c432
Compare
@samouss I updated the branch and this time, we can notice the bundle size decrease on Bundlesize. |
This reverts commit 5ec4609.
## [3.5.1](v3.5.0...v3.5.1) (2019-05-20) ### Bug Fixes * **types:** improve types for voiceSearch ([#3778](#3778)) ([ed2d61a](ed2d61a)) * **types:** update UiState type ([#3777](#3777)) ([36e3a3d](36e3a3d)) * **voiceSearch:** remove event listeners on dispose ([#3779](#3779)) ([0e988cc](0e988cc)) ### Reverts * chore(build): remove PropTypes from builds ([#3697](#3697)) ([#3776](#3776)) ([1e6be79](1e6be79))
Description
PropTypes were still mostly present in the bundles (both UMD and ES/CJS) despite the usage of the plugin
babel-plugin-transform-react-remove-prop-types
. As opposed to React InstantSearch, there's no reasons to expose PropTypes in our bundles. This PR aims at removing those.ignore
Rollup plugin to ignore theprop-types
package.{ removeImport: true }
, which defaults tofalse
, to remove all traces ofprop-types
imports (see documentation).The PropTypes remaining come from
preact-rheostat
, which will be addressed in a later PR.Result
Before the change
After the change
Related