PaintFilterWorker compilation error, need help

I am using create-react-app and when importing vtkPaintFilter it causes an error

export ‘default’ (imported as ‘PaintFilterWorker’) was not found in ‘vtk.js/Sources/Filters/General/PaintFilter/PaintFilter.worker’ (module has no exports)

Indeed there is no export in that file, why not providing an export in that file? Is it a bug or something?

Please help, thanks!

get it figured out.

PaintFilter.worker needs to be loaded by worker_loader. Step-by-step instruction is on cra github page

for js project, need to change react-app-rewired and use ‘test: /.worker.js$/’, instead of ‘test: /.worker.ts$/’,