refactor: Reduce bundle size (#1575)
* async load cornerstoneWADOImageLoader chunk * Lazy initializing of CornerstoneWADIImageLoader - delayed till Viewer creation * Async loading of react-vtkjs-viewport * withCornerstone HOC to wrap routes requiring CornerstoneWADOImageLoader initiazation * removed dead code in comments * initWeWorkers is no more. Remove al its references. Co-authored-by: kedar.netelixir <kedar.choudhary@netelixir.com> Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
20 files changed
+174
-136
No files matched your search
@@ -1,9 +1,10 @@
|
||||
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';
|
||||
import FileLoader from './fileLoader';
|
||||
import { getCornerstoneWADOImageLoader } from '../../utils/cornerstoneWADOImageLoader';
|
||||
|
||||
const PDFFileLoader = new (class extends FileLoader {
|
||||
fileType = 'application/pdf';
|
||||
loadFile(file, imageId) {
|
||||
async loadFile(file, imageId) {
|
||||
const cornerstoneWADOImageLoader = await getCornerstoneWADOImageLoader();
|
||||
return cornerstoneWADOImageLoader.wadouri.loadFileRequest(imageId);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user