vanvalenlab / kiosk-frontend

DeepCell web application built using NodeJS, Express, React, and Webpack.
Other
1 stars 0 forks source link

Use webpack best practices to reduce the size of bundle.js #72

Closed willgraf closed 5 years ago

willgraf commented 5 years ago

This PR prevents the warning that the bundle.js file is too large by using the CompressionPlugin and UglifyJsPlugin. Additionally, it uses @loadable/component to lazy load components, aiding in the chunking of the bundle.js payload. Finally, the Dockerfile and package.json were changed to call yarn build inside the Dockerfile, and remove it from the entrypoint. The source files are then removed from the Dockerfile to lighten the image.