Comments (8)
I'm @PintoGideon's coworker.
For anyone else here looking for a workaround, see FNNDSC/ChRIS_ui#1060
UMD seems to be working but ESM (the default) does not. So create an alias in vite.config.ts
to prefer the UMD build of @cornerstonejs/tools:
import { defineConfig } from "vite";
export default defineConfig({
resolve: {
alias: {
"@cornerstonejs/tools": "@cornerstonejs/tools/dist/umd/index.js"
},
},
});
from cornerstone3d.
from cornerstone3d.
seems like someone tried this and works for now
alias: {
'@cornerstonejs/tools': '@cornerstonejs/tools/dist/umd/index.js'
}
}`
from cornerstone3d.
The umd works, but the problem is compressed and it doesn't seem to have a source map.
from cornerstone3d.
I know :( we will fix it in next version since it will be a breaking change
from cornerstone3d.
seems like someone tried this and works for now
alias: { '@cornerstonejs/tools': '@cornerstonejs/tools/dist/umd/index.js' } }`
The code can be bundled, but it cannot run properly.
from cornerstone3d.
While the "alias" workaround fixes some issues the current version still cannot run on vitest
for example and gives the following error:
Module node_modules/@cornerstonejs/core/src/index.ts:1 seems to be an ES Module but shipped in a CommonJS package. You might want to create an issue to the package "@cornerstonejs/core" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.
Are there plans for a proper fix?
from cornerstone3d.
"node_modules@cornerstonejs\tools\src\workers\polySegConverters.js" is not packed to umd module and polyseg worker is not worked
from cornerstone3d.
Related Issues (20)
- [Bug] Trying to Set color of AnnotationTool's new Annotation HOT 1
- [Bug] rendering is white HOT 4
- [Bug] New version report exception
- [Bug] Uncaught (in promise) TypeError: Cannot destructure property 'pixelRepresentation' of 'metaData_exports.get(...)' as it is undefined. HOT 2
- Segmentation tool doesn't show segments has Labelmap index over 255 HOT 2
- [Bug] With Webpack setToolActive throws "Cannot read properties of undefined (reading 'renderViewport')" on stack viewport HOT 1
- Crosshair position synchronization to volume3D HOT 1
- [Bug] SplineContourSegmentationTool and LivewireContourSegmentationTool must end drawing when switching to other tools HOT 3
- [Bug] Copy annotation from stack viewport to another stack viewport(s) with different series (for Time-intensity curves) HOT 2
- [Bug] StackViewport with VolumeViewport3D breaks images rendered in StackViewport & VolumeViewport3D HOT 1
- [Bug] Exception thrown when retrieving enabled element before the completion of asynchronous 'setStack()' call. [Cannot destructure property 'imagePositionPatient' of 'imagePlaneModule' as it is undefined] HOT 3
- How can I display SR? HOT 1
- [Bug] StackViewport Cannot destructure property 'imagePositionPatient' of undefined.
- Sparse Matrix representation HOT 1
- [Feature Request] Configuration of labelmap segmentation HOT 1
- [Bug] What should I do if I want to Contour Segmentation to Closed Surface Segmentation again HOT 1
- [Bug] Uncaught Error: Event type was not defined at Module.triggerEvent (triggerEvent.ts:29:1), at i.onprogress (universalModuleDefinition:1:1)
- [Bug] Ellipse tool spamming ANNOTATION_MODIFIED events when it is outside volume
- [Bug] PlanarFreehandROITool decimate configuration parameter not working on annotation update
- [Bug] VolumeRotateMouseWheelTool stop rotate the whole body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cornerstone3d.