Bundle size
import 'mulling' gives you everything, at 9.6 kB compressed. To ship less, import from core and register the loaders you want:
import { mount, use } from 'mulling/core';import { coil, tide } from 'mulling/loaders';
use(coil, tide);mount(el, { type: 'coil' });| What you import | Compressed size |
|---|---|
mulling (everything) |
9.6 kB |
core + the three state loaders (stateLoaders) |
7.7 kB |
core + one loader |
7.4 kB |
react/core or vue/core, before loaders |
7.4 kB |
You choose which loaders to include: use() registers them, adding them to the list Mulling can show. Any you don’t import are left out of your bundle. core includes the done and error endings.
If a state’s default loader isn’t registered, Mulling shows the first registered loader instead and warns once in the console. A missing import never leaves a blank space.