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
Large build size in production #107
Comments
Are you sure that you are doing a The built version of the library is only roughly 750kb unminified and 440kb minified, so it shouldn't increase your bundle size to that degree. Going to create a project using webpack 2 and see if I can replicate the size. |
Yep, I've confirmed that inside my webpack config process.env.NODE_ENV is indeed 'production' |
@benhunt29 Which version are you using? Going to attempt to build similarly and analyze it myself. Guessing it may be due to immutable and firebase being included in the bundle that is being included as well (they are dependencies). It might Plans for |
@prescottprue I'm using 1.4.0-beta.3. Thanks for looking into this! |
Currently@benhunt29 I used the bundle analyzer myself, and it yielded the following from the minified bundle: PlanRemoving immutable (as is the plan in v2.0.0) should help to shrink the size, but I think it is still mostly Firebase. Maybe there is a way to modify your webpack config to point directly to the source or es5ified source (the
Will continue to post any updates. |
* #107 - `build:size` npm script added to generate size report for minified bundle * #109 - Firebase version is not fixed - all v1.4.0-* versions use `^` on firebase * Multiple Dependencies and Dev Dependencies updated (including `firebase` and `jwt-decode`) * Yarn file updated * Compose tests improved promise handling (better use of `chai-as-promised`) * Linting removed from updated `eslint-config-standard` rules
Just as an update: It would be good to know what relative size you are aiming for as well (keeping in mind that this includes firebase's library as well). |
great, I'll check it out. thanks! |
#### Features * `react-native` support (including [complete example](https://github.com/prescottprue/react-redux-firebase/tree/v1.4.0-beta/examples/complete/react-native) app as well as a [create your own recipe](/docs/recipes/react-native.md)) * Server Side Rendering Support ([#72](#72)) * Support for Boilerplates ([#53](#53)) * `pushWithMeta`, `setWithMeta`, and `updateWithMeta` methods added - write to firebase with createdAt/updatedAt and createdBy/updatedBy * Fix for `unWatchEvent` helper dispatch mapping (#82) * `populatedDataToJS` triggers `isLoaded` to be true only when all data is populated (instead of once for unpopulated data) [#121](#121) * Support for `provider.setCustomParameters` on external auth providers (i.e. `provider.setCustomParameters({ prompt: 'select_account' })`) * `notParsed` query param option added for not parsing when using `equalTo` (for searching numbers stored as strings) * `profileParamsToPopulate` now works for `$key: true` lists (thanks @fej-snikduj) * `onRedirectResult` config option added (runs when redirect result occurs) #### Enhancements/Fixes * Improvements to Material Example * Projects route is now protected (using `UserIsAuthenticated` HOC from `utils/router`) * Todos list only displays first 8 (first at the top) - shows using ordering query params * Most main routes are now sync (more simple) * Firebase Library dependency updated to [`v3.9.0`](https://firebase.google.com/support/release-notes/js) * Fix for `unWatchEvent` helper dispatch mapping ([#82](#82)) * Firebase version is no longer fixed ([#109](#109)) * Only used parts of Firebase Library imported (shrinks bundle size) * `build:size` npm script added to generate size report for minified bundle ([#107](#107)) * `user` and `credential` are now returned from login method (solves [#106](#106)) * `yarn.lock` file added * Compose tests improved promise handling (better use of chai-as-promised) * `profileParamsToPopulate` now accepts `key: true` lists - thanks [@fej-snikduj](https://github.com/fej-snikduj)
* `react-native` support (including [complete example](https://github.com/prescottprue/react-redux-firebase/tree/v1.4.0-beta/examples/complete/react-native) app as well as a [create your own recipe](/docs/recipes/react-native.md)) * Server Side Rendering Support ([#72](#72)) * Support for Boilerplates ([#53](#53)) * `pushWithMeta`, `setWithMeta`, and `updateWithMeta` methods added - write to firebase with createdAt/updatedAt and createdBy/updatedBy * Fix for `unWatchEvent` helper dispatch mapping (#82) * `populatedDataToJS` triggers `isLoaded` to be true only when all data is populated (instead of once for unpopulated data) [#121](#121) * Support for `provider.setCustomParameters` on external auth providers (i.e. `provider.setCustomParameters({ prompt: 'select_account' })`) * `notParsed` query param option added for not parsing when using `equalTo` (for searching numbers stored as strings) * `profileParamsToPopulate` now works for `$key: true` lists (thanks @fej-snikduj) * `onRedirectResult` config option added (runs when redirect result occurs) * Improvements to Material Example * Projects route is now protected (using `UserIsAuthenticated` HOC from `utils/router`) * Todos list only displays first 8 (first at the top) - shows using ordering query params * Most main routes are now sync (more simple) * Firebase Library dependency updated to [`v3.9.0`](https://firebase.google.com/support/release-notes/js) * Fix for `unWatchEvent` helper dispatch mapping ([#82](#82)) * Firebase version is no longer fixed ([#109](#109)) * Only used parts of Firebase Library imported (shrinks bundle size) * `build:size` npm script added to generate size report for minified bundle ([#107](#107)) * `user` and `credential` are now returned from login method (solves [#106](#106)) * `yarn.lock` file added * Compose tests improved promise handling (better use of chai-as-promised) * `profileParamsToPopulate` now accepts `key: true` lists - thanks [@fej-snikduj](https://github.com/fej-snikduj)
For those planning on posting another issue on shrinking size in the future: Please provide the relative size you are aiming for (please keep in mind that this size includes Firebase's library as well) |
### Features * [X] Keeping data on logout - #125 * [X] Listeners now kept on state (follows byId/allIds pattern [from redux docs](http://redux.js.org/docs/recipes/reducers/UpdatingNormalizedData.html)) * [X] `ordered` reducer added for managing ordered state (`SET_ORDERED` no longer used) * [X] `populate` works for profile (needed to remove share population logic) * [X] Presence capability added to show currently logged in users and track user sessions (`presence` in config) * [X] Firebase is no longer a dependency (build size, native compatibility, bundling for boilerplates, etc.) - #173, #131, #107 ### Fixes/Enhancements * Drop support for passing Firebase instance * Auto profile population removed (profile population will require using populate) * `isLoaded` and `isEmpty` logic simplified * Tests passing with new syntax (including reducers) * Drop support and deprecation warning for `profileDecorator` (use `profileFactory`) * Drop support and deprecation warning for `distpatchOnUnsetListener` (use `distpatchOnUnsetListener`, note incorrect spelling) * Tests no longer skipped from linting * Tons of other code simplifications
* `react-native` support (including [complete example](https://github.com/prescottprue/react-redux-firebase/tree/v1.4.0-beta/examples/complete/react-native) app as well as a [create your own recipe](/docs/recipes/react-native.md)) * Server Side Rendering Support ([#72](prescottprue/react-redux-firebase#72)) * Support for Boilerplates ([#53](prescottprue/react-redux-firebase#53)) * `pushWithMeta`, `setWithMeta`, and `updateWithMeta` methods added - write to firebase with createdAt/updatedAt and createdBy/updatedBy * Fix for `unWatchEvent` helper dispatch mapping (#82) * `populatedDataToJS` triggers `isLoaded` to be true only when all data is populated (instead of once for unpopulated data) [#121](prescottprue/react-redux-firebase#121) * Support for `provider.setCustomParameters` on external auth providers (i.e. `provider.setCustomParameters({ prompt: 'select_account' })`) * `notParsed` query param option added for not parsing when using `equalTo` (for searching numbers stored as strings) * `profileParamsToPopulate` now works for `$key: true` lists (thanks @fej-snikduj) * `onRedirectResult` config option added (runs when redirect result occurs) * Improvements to Material Example * Projects route is now protected (using `UserIsAuthenticated` HOC from `utils/router`) * Todos list only displays first 8 (first at the top) - shows using ordering query params * Most main routes are now sync (more simple) * Firebase Library dependency updated to [`v3.9.0`](https://firebase.google.com/support/release-notes/js) * Fix for `unWatchEvent` helper dispatch mapping ([#82](prescottprue/react-redux-firebase#82)) * Firebase version is no longer fixed ([#109](prescottprue/react-redux-firebase#109)) * Only used parts of Firebase Library imported (shrinks bundle size) * `build:size` npm script added to generate size report for minified bundle ([#107](prescottprue/react-redux-firebase#107)) * `user` and `credential` are now returned from login method (solves [#106](prescottprue/react-redux-firebase#106)) * `yarn.lock` file added * Compose tests improved promise handling (better use of chai-as-promised) * `profileParamsToPopulate` now accepts `key: true` lists - thanks [@fej-snikduj](https://github.com/fej-snikduj)
* `react-native` support (including [complete example](https://github.com/prescottprue/react-redux-firebase/tree/v1.4.0-beta/examples/complete/react-native) app as well as a [create your own recipe](/docs/recipes/react-native.md)) * Server Side Rendering Support ([#72](prescottprue/react-redux-firebase#72)) * Support for Boilerplates ([#53](prescottprue/react-redux-firebase#53)) * `pushWithMeta`, `setWithMeta`, and `updateWithMeta` methods added - write to firebase with createdAt/updatedAt and createdBy/updatedBy * Fix for `unWatchEvent` helper dispatch mapping (#82) * `populatedDataToJS` triggers `isLoaded` to be true only when all data is populated (instead of once for unpopulated data) [#121](prescottprue/react-redux-firebase#121) * Support for `provider.setCustomParameters` on external auth providers (i.e. `provider.setCustomParameters({ prompt: 'select_account' })`) * `notParsed` query param option added for not parsing when using `equalTo` (for searching numbers stored as strings) * `profileParamsToPopulate` now works for `$key: true` lists (thanks @fej-snikduj) * `onRedirectResult` config option added (runs when redirect result occurs) * Improvements to Material Example * Projects route is now protected (using `UserIsAuthenticated` HOC from `utils/router`) * Todos list only displays first 8 (first at the top) - shows using ordering query params * Most main routes are now sync (more simple) * Firebase Library dependency updated to [`v3.9.0`](https://firebase.google.com/support/release-notes/js) * Fix for `unWatchEvent` helper dispatch mapping ([#82](prescottprue/react-redux-firebase#82)) * Firebase version is no longer fixed ([#109](prescottprue/react-redux-firebase#109)) * Only used parts of Firebase Library imported (shrinks bundle size) * `build:size` npm script added to generate size report for minified bundle ([#107](prescottprue/react-redux-firebase#107)) * `user` and `credential` are now returned from login method (solves [#106](prescottprue/react-redux-firebase#106)) * `yarn.lock` file added * Compose tests improved promise handling (better use of chai-as-promised) * `profileParamsToPopulate` now accepts `key: true` lists - thanks [@fej-snikduj](https://github.com/fej-snikduj)
* `react-native` support (including [complete example](https://github.com/prescottprue/react-redux-firebase/tree/v1.4.0-beta/examples/complete/react-native) app as well as a [create your own recipe](/docs/recipes/react-native.md)) * Server Side Rendering Support ([#72](prescottprue/react-redux-firebase#72)) * Support for Boilerplates ([#53](prescottprue/react-redux-firebase#53)) * `pushWithMeta`, `setWithMeta`, and `updateWithMeta` methods added - write to firebase with createdAt/updatedAt and createdBy/updatedBy * Fix for `unWatchEvent` helper dispatch mapping (#82) * `populatedDataToJS` triggers `isLoaded` to be true only when all data is populated (instead of once for unpopulated data) [#121](prescottprue/react-redux-firebase#121) * Support for `provider.setCustomParameters` on external auth providers (i.e. `provider.setCustomParameters({ prompt: 'select_account' })`) * `notParsed` query param option added for not parsing when using `equalTo` (for searching numbers stored as strings) * `profileParamsToPopulate` now works for `$key: true` lists (thanks @fej-snikduj) * `onRedirectResult` config option added (runs when redirect result occurs) * Improvements to Material Example * Projects route is now protected (using `UserIsAuthenticated` HOC from `utils/router`) * Todos list only displays first 8 (first at the top) - shows using ordering query params * Most main routes are now sync (more simple) * Firebase Library dependency updated to [`v3.9.0`](https://firebase.google.com/support/release-notes/js) * Fix for `unWatchEvent` helper dispatch mapping ([#82](prescottprue/react-redux-firebase#82)) * Firebase version is no longer fixed ([#109](prescottprue/react-redux-firebase#109)) * Only used parts of Firebase Library imported (shrinks bundle size) * `build:size` npm script added to generate size report for minified bundle ([#107](prescottprue/react-redux-firebase#107)) * `user` and `credential` are now returned from login method (solves [#106](prescottprue/react-redux-firebase#106)) * `yarn.lock` file added * Compose tests improved promise handling (better use of chai-as-promised) * `profileParamsToPopulate` now accepts `key: true` lists - thanks [@fej-snikduj](https://github.com/fej-snikduj)
Any idea why I'm getting such a large vendor bundle size (1.24MB) when including this library? Using
webpack-bundle-analyzer
shows this library is the main contributor to the large file size.I'm using webpack 2 and here's my config. I'm relatively new to webpack and definitely new to this library so please forgive me if I'm doing something stupid.
The text was updated successfully, but these errors were encountered: