TakwimuAfrica / Takwimu

Takwimu is a free and open development information service, transforming access to high quality analysis and data for African changemakers. Accessible at https://takwimu.africa/
https://takwimu.africa/
GNU General Public License v3.0
13 stars 1 forks source link

Improve Build #593

Closed kilemensi closed 5 years ago

kilemensi commented 5 years ago

Description

We've grown past the recommended single chunk size for our build. This PR introduce code splitting targeting the two largest libraries we're using: pdf-js and react-pdf.

Type of change

Please delete options that are not relevant.

Screenshots

Problem

Build warning

Screenshot from 2019-06-21 09-40-22

Analysis

Screenshot_2019-06-21  combined  - Source Map Explorer(1)

Solution

Build

Screenshot from 2019-06-21 09-35-48

Analysis

Screenshot_2019-06-21  combined  - Source Map Explorer

Checklist:

kilemensi commented 5 years ago

My only annoyance with the code is ... style={classes.header} why not just called it style={styles.header}.

I wrestled with @karimkawambwa (I even though of continuing to use pdfStyles) but in the end I chose to stick to the convention of calling them classes from within a component per Material UI.