ESM CDN has a Bundle Mode to put all dependencies into a single JS file, see doc. We use the ?bundle in example.local.html when importing ngl in order to fix the error Uncaught (in promise) TypeError: tp.scale is not a function. When using bundle mode, ngl.bundle.mjs file is created under esm.sh, see
However, this solution does not work for example.html and ngl.bundle.mjs file is NOT created. Instead when ?bundle is added to haddock3-analysis-components i.e. "https://esm.sh/@i-vresse/haddock3-analysis-components?bundle", the example works.
ESM CDN has a Bundle Mode to put all dependencies into a single JS file, see doc. We use the![image](https://github.com/i-VRESSE/haddock3-analysis-components/assets/55081872/59bb0445-45e0-4dd6-b71f-a4ca914aa2e6)
?bundle
in example.local.html when importing ngl in order to fix the errorUncaught (in promise) TypeError: tp.scale is not a function
. When using bundle mode,ngl.bundle.mjs
file is created under esm.sh, seeHowever, this solution does not work for example.html and
ngl.bundle.mjs
file is NOT created. Instead when?bundle
is added to haddock3-analysis-components i.e."https://esm.sh/@i-vresse/haddock3-analysis-components?bundle"
, the example works.