Skip to content

docs(importmaps): use importmaps for external script#3200

Merged
floryst merged 1 commit intoKitware:masterfrom
daker:docs-import-maps
Aug 14, 2025
Merged

docs(importmaps): use importmaps for external script#3200
floryst merged 1 commit intoKitware:masterfrom
daker:docs-import-maps

Conversation

@daker
Copy link
Collaborator

@daker daker commented Jan 1, 2025

Context

Recommend the use of importmaps

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places that reference https://unpkg.com/vtk.js, you might want to modify those as well...

@floryst should we mention both options ? with and without import maps ?

@daker daker force-pushed the docs-import-maps branch from a607867 to e7023df Compare January 2, 2025 10:30
@daker daker force-pushed the docs-import-maps branch from e7023df to e3b5626 Compare January 2, 2025 10:32
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@finetjul finetjul requested a review from floryst January 2, 2025 11:05
Copy link
Contributor

@floryst floryst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. I would like to request that we add the ES module code in addition to the UMD bundle. We can have two headings, such as "Using ES Modules" and "Using the UMD bundle", in that order.

@daker
Copy link
Collaborator Author

daker commented Mar 6, 2025

@floryst when you say two headings, you mean one for import * from '@kitware/...' and one for vtk.Rendering ?

@floryst
Copy link
Contributor

floryst commented Mar 11, 2025

Yes. I see you replaced the UMD code with the importmaps code. While I agree with moving forward with importmaps (esp given its support across major browsers), I would like to keep some of the UMD docs around for a bit longer.

Copy link
Contributor

@floryst floryst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In revisiting this, I think we can go ahead and drop the UMD instructions. Modern baseline browsers support importmaps, and if we really need to support much older browsers, something else will likely break.

@sankhesh
Copy link
Collaborator

@floryst @daker Is this ready to be merged?

@daker
Copy link
Collaborator Author

daker commented Aug 12, 2025

@sankhesh for me it's ok

@floryst floryst added this pull request to the merge queue Aug 14, 2025
Merged via the queue into Kitware:master with commit fe0008d Aug 14, 2025
3 checks passed
@daker daker deleted the docs-import-maps branch August 29, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments