Open vespasianvs opened 2 years ago
The imports are all around has node checks - e.g. ENVIRONMENT_IS_NODE , so I'm not sure I see the problem here? For browser we inject the wasm with raw.macro
I fixed this issue for my dicom-parser by re-building CharLS etc. with appropriate flags generating a separate entry point for web use. You can find the forks here.
dicom.ts is a UI module, but it is using NodeJS modules (fs and path) in CharLS and OpenWASM components. This means that in Webpack5 the polyfills need adding manually (webpack5 removes default NodeJS polyfills) and can cause problems for future users. Suggest switching the imports to:
path -> path-browserify fs -> graceful-fs