fix: webpack import bugs showing warnings on import (#4265)
This commit is contained in:
1 parent
6d11048ca5
commit
24c511f4bc
23 files changed
+975
-1008
No files matched your search
@@ -49,13 +49,6 @@ class DicomMicroscopyViewport extends Component {
|
||||
resizeRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),
|
||||
};
|
||||
|
||||
/**
|
||||
* Need to return this as a function to prevent webpack from munging it.
|
||||
*/
|
||||
public static getImportPath() {
|
||||
return '/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the nearest ROI from the mouse click point
|
||||
@@ -94,9 +87,8 @@ class DicomMicroscopyViewport extends Component {
|
||||
// you should only do this once.
|
||||
async installOpenLayersRenderer(container, displaySet) {
|
||||
const loadViewer = async metadata => {
|
||||
await import(
|
||||
/* webpackIgnore: true */ DicomMicroscopyViewport.getImportPath());
|
||||
const { viewer: DicomMicroscopyViewer, metadata: metadataUtils } = (window as any).dicomMicroscopyViewer;
|
||||
const dicomMicroscopyModule = await this.microscopyService.importDicomMicroscopyViewer();
|
||||
const { viewer: DicomMicroscopyViewer, metadata: metadataUtils } = dicomMicroscopyModule;
|
||||
|
||||
const microscopyViewer = DicomMicroscopyViewer.VolumeImageViewer;
|
||||
|
||||
|
||||
Reference in new issue
Block a user