Add ESM bundle build#2
Conversation
|
@neurolabusc @hanayik I am looking to use this in examples, e.g. InsightSoftwareConsortium/ITK-Wasm#1375 |
|
@thewtex , this esbuild command with --bundle will inline all the dependencies right? For downstream projects, that's not ideal. It might be good to use the exports field in the package.json and setup an export for the main non-bundled entry point and another for the bundled entry point to offer both options. |
|
@hanayik good catch. My intention is to create a bundle that inline's dependencies for easy usage in the browser. What do you think of just switching |
|
@thewtex that works. Exports is probably the more modern approach but using main as it was is fine. You’ll need to add “dist” to the files field in package.json so that it is included in the npm package. |
For no-build web page examples.
|
@hanayik 👍 done |
|
@thewtex now that ITK-WASM natively supports NIfTI voxels and MZ3 meshes, is it possible for NiiVue to use those formats (which are also native is NiiVue) without using the cbor loader? In other words, both tools can communicate in using formats that do not require a plugin loader. |
|
@neurolabusc yes, it is pretty awesome 😍 In the ITK-Wasm docs, I am going to use iwi2niiCore, etc. It will be nice to also create Niivue loaders with the plug-in infrastructure you created recently to provide easy access to the @itk-wasm/image-io functionality |
For no-build web page examples.