Closed AkiiLucky closed 1 year ago
I also have this problem.
import * as nifti from 'nifti-reader-js'
Try it.
cdn version missing nifti
global var
@AkiiLucky , @iamiota , @1isten , @HuangJia-Le ,
I have submitted a new PR (#33) that should address this. When we switch to typescript and esbuild there was a flag omitted which meant we were not building the ESmodule properly. When #33 is merged in, you should be able to use nifti-reader-js from the npm CDN as long as you specify that your <script>
tags are modules like this:
<script type="module">
import * as nifti from './nifti-reader.js';
window.nifti = nifti.default;
console.log(nifti);
</script>
Uncaught ReferenceError: nifti is not defined"