Drop/replace dependency @icr/polyseg-wasm or make it optional
What feature or change would you like to see made?
The @icr/polyseg-wasm library is causing a significant number of problems, e.g., https://github.com/cornerstonejs/cornerstone3D/issues/1071, https://github.com/cornerstonejs/cornerstone3D/issues/1228, https://github.com/cornerstonejs/cornerstone3D/issues/1238. These issues mention vite as build tool, but the problem also appears when using webpack and probably other buildtools. So it seems that the problem is not in cornerstone, vite or webpack but in @icr/polyseg-wasm.
Since the last commit to @icr/polyseg-wasm was nine months ago and there are no reactions to submitted issues, it might be that the library is not maintained any longer. Thus we should consider dropping or replacing this dependency.
If I understand @icr/polyseg-wasm correctly, it should not be necessary to use it when one just wants to display image volumes with cornerstone. If this already possible, two short demos using vite and webpack would be appreciated.
Why should we prioritize this feature?
It looks to me as if cornerstone cannot be build currently using vite, webpack and probably other build tools. So using cornerstone in a modern webdev pipeline does not seem possible right now.