cornerstonejs / cornerstoneTools

[Deprecated] Use Cornerstone3D Instead https://cornerstonejs.org/
MIT License
579 stars 456 forks source link

I’m unable to build a project using Vue3+Vite. #1558

Closed bearxy closed 10 months ago

bearxy commented 1 year ago

After deploying the project, I encountered the following problems:

I received a warning about circular references. I temporarily resolved this issue by setting the manualChunks property in vite.config.js. I tested all the code in the project and found that as long as CornerstoneTools is referenced, this error will occur, but it works normally in the development environment. Next, when I built the production environment code and enabled the property of not compressing the code, I got the error: Cannot access 'elementCursor' before initialization. To ensure the error is reproducible, I re-added a Vue3 project and only imported CornerstoneTools, and the error was consistent. How should I solve this problem?

rAum commented 10 months ago

I have the same issue with vite/react, how did you solve it?