-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Cornerstone3D tools does not build with vite #1071
Comments
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 import { defineConfig } from "vite";
export default defineConfig({
resolve: {
alias: {
"@cornerstonejs/tools": "@cornerstonejs/tools/dist/umd/index.js"
},
},
}); |
seems like someone tried this and works for now alias: { |
I know :( we will fix it in next version since it will be a breaking change |
The code can be bundled, but it cannot run properly. |
While the "alias" workaround fixes some issues the current version still cannot run on
Are there plans for a proper fix? |
"node_modules@cornerstonejs\tools\src\workers\polySegConverters.js" is not packed to umd module and polyseg worker is not worked |
Since there are many other people complaining about web workers and Vite as well, I'm adding this here. |
I'm working on cornerstone3D 2.x and have made progress in removing circular dependencies and publishing the types for the DICOM image loader. I'm trying to make it work with Vite, but there are numerous issues with Vite in I have started a template project for Vite, React, and cornerstone3D beta 2.x here. I appreciate your help in making it work. https://github.com/cornerstonejs/vite-react-cornerstone3d |
Describe the Bug
I am currently using cornerstone3D in a react app. I get this error when running an
npm run build
during build:I tried instaling vite-plugin-wasm with no luck. Anyone else seeing this error ?
Steps to Reproduce
The current behavior
N/A
The expected behavior
N/A
OS
Linux
Node version
Nodejs 20.7
Browser
Chrome
The text was updated successfully, but these errors were encountered: