reshape/loader

More efficient runtime export

Opened this issue · 0 comments

If used in the default mode (exporting a template function), a runtime is necessary in order to properly execute the function.

The best way to export the runtime would be just once, as it is shared between multiple modules, so exporting it alongside each module would be a waste of space. It also needs to be taken into consideration that it's possible that two different runtimes could be generated if using two different plugin packs.

Right now, the runtime is exported alongside each function. This isn't a disaster, the redundancy is eliminated by gzip, but it should not be how this is done in the long run.