Skip to content
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

fix(examples): use ESM package in examples #2631

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

daker
Copy link
Collaborator

@daker daker commented Nov 11, 2022

Context

The recommended package is the ESM package but the UMD packages is used in all examples, this PR will allow all the examples to switch to ESM package.

Results

All the examples should build fine and use the ESM package @kitware/vtk.js

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:

@daker daker mentioned this pull request Nov 11, 2022
4 tasks
@jourdain
Copy link
Collaborator

Did you try to run npm run example -- SimpleCone just to validate that the example runner was fine with the code change along with npm run doc:www for the website generation?

@daker
Copy link
Collaborator Author

daker commented Nov 12, 2022

Yes i have tried to launch some examples, they work without errors. For the doc:www command, the webpack part is built successfully but launching Chrome fails since i don't use it.

@floryst
Copy link
Collaborator

floryst commented Nov 14, 2022

Documentation/config.js also needs the alias, as that file defines the webpack config for building the examples.

@daker daker force-pushed the switch-examples-esm branch from 9efdab1 to 822793f Compare November 16, 2022 23:28
@jourdain
Copy link
Collaborator

@floryst should we merge? Or are you waiting on something before merging it?

@daker
Copy link
Collaborator Author

daker commented Nov 17, 2022

I still have to add the alias for the documentation, but i am unable to see the result of the example(the same page is displayed inside the iframe)

@jourdain
Copy link
Collaborator

Yes the iframe as an issue when running locally but if you go to the full example it should work.

@daker daker force-pushed the switch-examples-esm branch from 822793f to de839e3 Compare November 17, 2022 20:09
@daker
Copy link
Collaborator Author

daker commented Nov 17, 2022

@floryst I have made the changes, the Examples/Applications are building and working

@floryst
Copy link
Collaborator

floryst commented Nov 18, 2022

Sounds good! I'll test it one more time and if it's good, I'll go ahead and merge.

@floryst
Copy link
Collaborator

floryst commented Nov 21, 2022

LGTM, thanks!!!

@floryst floryst merged commit aac9b6f into Kitware:master Nov 21, 2022
@github-actions
Copy link

🎉 This PR is included in version 25.13.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Nov 21, 2022
@daker daker deleted the switch-examples-esm branch November 21, 2022 18:42
@github-actions
Copy link

🎉 This PR is included in version 26.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released on @beta Automated label label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @beta Automated label released Automated label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants