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
Bundle viewer #57
Bundle viewer #57
Conversation
client/src/ImageSelector.jsx
Outdated
@@ -8,6 +8,7 @@ import { | |||
} from './utils' | |||
import './style.css' | |||
import { debounce } from 'lodash' | |||
import 'itk-vtk-viewer' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> something like:
import createViewer from 'itk-vtk-viewer/src/createViewer'
The idea: we do not use the exports of the package (which is pointing to a bundled version). Avoid the current difficulties bundling the bundle. In the future we will have nice ESM to work with. For now, we will also have to set up the WebPack rules similar to itk-vtk-viewer: 1) a resolve
alias
for itkConfig.js
. 2) The vtk.js WebPack rules for building the shaders, CSS, etc.
CC @PaulHax
Thanks for the tips @thewtex! I have been working on this some more using your suggestions but I am currently stuck on the following error:
I've pushed a WIP commit with the most recent changes in case there is something obvious that you can see that I am doing wrong, in the meantime I'll keep looking into what's going on and reading up on webpack rules to try and understand what I'm missing. |
@bnmajor I believe this is addressed by enabling the https://github.com/Kitware/itk-vtk-viewer/blob/e0b5bffc8cd499b9f8ac310ba2b1fe7ee3309a9b/.babelrc#L9 |
Thanks @thewtex! I did try this but still have the error, unfortunately. |
@bnmajor is Or is a different babel config being picked up? |
Use babel.config rather than .babelrc so that configuration is applied project wide rather than to a subset of the files.
@thewtex Thank you for pointing this out, I had |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ 💖
Bundle the itk-vtk-viewer with the python package
WIP: Relies on Kitware/itk-vtk-viewer#475. Will need to update viewer version once that PR is in.
Fixes #53