Optimizations#
This document lists a couple of optimizations that can be performed to reduce the disk size of the static assets and improve loading times.
Removing Applications#
Provide the --apps
CLI argument once or multiple times, or configure
LiteBuildConfig/apps
to only copy select applications to the output folder: by
default, all of the default applications
will be copied to the output folder.
Removing Source Maps#
Provide --no-sourcemaps
, or configure LiteBuildConfig/no_sourcemaps
in a config file
to prevent any .map
files from being copied to the output folder. This creates a
drastically smaller overall build.
Warning
Removing sourcemaps, in addition to making errors harder to debug, will also
cause many 404
errors when a user does open the browser console, which
can be even more confusing.
For better baseline performance, the core JupyterLite distribution, and some federated extensions, only ship optimized JavaScript code, which is hard to debug. To improve this, source maps, are also provided to provide pointers to the original source code, and while much larger, are only loaded when debugging in browser consoles.