-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bundling viewer #4
base: main
Are you sure you want to change the base?
Conversation
@PaulHax no success yet but wanted to share the approach I was working on |
Guessing that the build is pulling from this file: But we want tsup to get the browser conditional index.js Is it possible to feed that |
PR against this branch to address the build here: #5 🎇 |
This ensures we get the correct package.json `exports` conditions. Which is passed to esbuild https://esbuild.github.io/api/#platform to get the correct conditions for the `browser`: https://nodejs.org/api/packages.html#resolving-user-conditions The default for tsup is `node`.
Use --platform browser in tsup
@PaulHax @thewtex I think we will be integrating this, which might be a generic vehicle to get any renderer into myst https://github.com/manzt/anymyst |
@stevejpurves awesome! We will look into that soon as we explore re-adding ipywidget support to itkwidgets At the same time, the itk-viewer plugin will also be helpful because it will not require writing or running any code. |
purpose of this PR is to attempt to bundle all itk viewer deps (without the WASM) into a single file (ESM) that can then be dynamically loaded in the NodeRenderer