cornerstonejs / cornerstoneTools

A framework for tools built on top of Cornerstone.
https://tools.cornerstonejs.org/
MIT License
574 stars 456 forks source link

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

Closed bearxy closed 5 months ago

bearxy commented 7 months 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 5 months ago

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