Reducing size of JS bundle #568
gmaclennan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Related to #133 which is focussed on the size of the built app installer.
This issue is focussed on the JS bundle used in the electron renderer. The size of the JavaScript that is loaded in the front-end affects the initial load and parse time as well as the size of the app.
Currently the renderer JS code is not bundled - it is required at runtime from
node_modules
. Changing the Webpack config to bundle all files results in a bundle that is 11.17Mb. This is already an improvement on unbundled code. The main size hogs are:The biggest size hog is iD Editor. A lot of that is probably multi-lingual support for presets and background map layer info + all the OSM icon sets.
There are numerous smaller modules like iconv-lite and different versions of core-js that take up about 150kb each that could also be trimmed if needed.
Beta Was this translation helpful? Give feedback.
All reactions