build(vite): add default export to ColorMaps.json.js virtual stub#12
Closed
PaulHax wants to merge 2 commits into
Closed
build(vite): add default export to ColorMaps.json.js virtual stub#12PaulHax wants to merge 2 commits into
PaulHax wants to merge 2 commits into
Conversation
Bumps @kitware/vtk.js from ^32.12.1 to ^35.15.1. Per vtk.js BREAKING_CHANGES (33 -> 34), several volume mapper setters were moved from the mapper onto the volume property. Adjust callers to invoke the new property-based setters: - src/utils/volumeProperties.ts: route the relevant set* calls through the volume's property instead of the mapper. - src/components/vtk/VtkBaseVolumeRepresentation.vue: same migration for the representation component's mapper/property interactions.
VolView's virtual-modules plugin stubs @kitware/vtk.js's ColorMaps.json.js to drop the unused built-in colormap data. The stub exported only the named binding `v`, which matched the minified internal symbol that vtk.js's Rollup build emitted for that module. vtk.js v36 (Kitware/vtk-js#3435) swaps Rollup for Vite/Rolldown. The new build emits ColorMaps.json.js with `export default` instead of the minified name `v`, and ColorMaps.js imports it as a default. The named-only stub then fails the build with: "default" is not exported by ColorMaps.json.js Exporting both `v` and `default` keeps the stub valid on vtk.js v35 (named `v`) and v36 (default), so the eventual v36 bump needs no further change.
Owner
Author
|
Superseded by Kitware#879, which now upgrades straight to vtk.js v36.0.0 and folds in this ColorMaps stub fix (the v35.15.1 intermediate step is no longer needed now that v36 has shipped). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on Kitware#879 (base branch:
vtk-js-upgrade). This PR is just thesingle-line ColorMaps stub change, so the new-bundle fix can be reviewed
on its own.
What
VolView's
virtual-modulesplugin invite.config.tsstubs@kitware/vtk.js's internalColorMaps.json.jsto drop the unusedbuilt-in colormap data. The stub exported only the named binding
v.Why
vwas never a vtk.js contract. It is the minified internal symbolRollup emitted for that JSON module. vtk.js v36
(Kitware/vtk-js#3435)
swaps Rollup for Vite/Rolldown, which instead emits
ColorMaps.json.jswith
export default, andColorMaps.jsimports it as a default.Against the named-only stub the build fails:
Change
Verified by building VolView against a local pack of vtk-js PR 3435.