window-pixi

5.3.3 • Public • Published

window-pixi

In Vitessce, we want to lazy-load HiGlass, to reduce the bundle size, since we only need to use HiGlass when visualizing data with genomic coordinates.

It is difficult or impossible to use lazy loading when the consumer library (in this case Vitessce) also needs to be bundled and lazy loaded itself (in this case in the HuBMAP Portal).

One option is to use dynamic imports with absolute / external URLs to the HiGlass JavaScript bundle. However, HiGlass depends on PIXI.js. The PIXI JavaScript bundle is not compatible with dynamic imports because it sets PIXI as a module-scope variable (var PIXI = ...) reference.

So we just need to append the following line:

window.PIXI = PIXI;

Readme

Keywords

none

Package Sidebar

Install

npm i window-pixi

Weekly Downloads

18

Version

5.3.3

License

MIT

Unpacked Size

1.94 MB

Total Files

4

Last publish

Collaborators

  • keller-mark