tancredi/fantasticon

Lazy loading of generators

Opened this issue · 0 comments

We're having issues with ttf2woff2 in fantasticon, and we expect that by turning off woff2 in config it would not be imported, but it is.

This is what we get with ttf2woff2:

failed to compile wasm module: RangeError: WebAssembly.Instance(): Out of memory: wasm memory

It would really be great if all these generators were lazy loaded when they're actually required, and right now they're loaded all the time, which increases startup time and memory usage, and in our case, triggers unnecessary and compilation blocking exceptions.