-
Notifications
You must be signed in to change notification settings - Fork 44
Client wasm multiple targets #2135
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
Merged
Merged
Conversation
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
673e990
to
fe8b486
Compare
eb13b9e
to
1dd0dfb
Compare
jpraynaud
approved these changes
Nov 22, 2024
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.
LGTM 🚀
1dd0dfb
to
2e46884
Compare
dlachaume
approved these changes
Nov 22, 2024
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.
LGTM 🚀
2e46884
to
347430d
Compare
sfauvel
approved these changes
Nov 25, 2024
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.
LGTM
+ adapt www, www-test, and explorer `package.json` and upgrade their dependencies Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
- Move nodejs & web browser examples to the `/examples` directory - Standardize them: add a README and a MAKEFILE when missing - Rename `mithril-client-wasm/www-test` to `ci-test` - adapt ci - adapt upgrade repository dependencies devbook Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
347430d
to
b0936ca
Compare
by targetting explicitly the web package, else NextJs want to target both the node package for it's Server side rendering and the web package for the client side. It then fail to find the node package and fallback to client rendering with an error. Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
b0936ca
to
773eb19
Compare
As previous version `8.57.1` is now deprecated
* mithril-client-wasm from `0.6.1` to `0.7.0` * [js] mithril-client-wasm from `0.6.1` to `0.6.2` * [js] mithril-explorer from `0.7.18` to `0.7.19` Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
Co-authored-by: Damien Lachaume <dlachaume@users.noreply.github.com>
773eb19
to
9e8e19e
Compare
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.
Content
This PR rework our npm published
mithril-client-wasm
package in order to include multiple targets (node, web, bundler) instead of only the web target.This allow Node.Js users to use our published package instead of needing to manually build a package.
This works by defining manually a
package.json
to aggregates built wasm-pack targets into a single package.Inside it we set the
main
and thebrowser
entrypoints so child projects can automatically choose the relevant targets between node and web meaning that existing client should not needs any change.Note
Some clients that use mixed projects types (typically that use SSR, ie: NextJs) can have trouble with the automatic detection, in this case they can target a specific package in their
package.json
Example to target directly the
web
package:todo: update wasm readme (compat table and fallbacks).
Pre-submit checklist
Issue(s)
Closes #2091