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

Created @vocdoni/react-providers #81

Merged
merged 3 commits into from
Aug 8, 2023
Merged

Created @vocdoni/react-providers #81

merged 3 commits into from
Aug 8, 2023

Conversation

elboletaire
Copy link
Member

@elboletaire elboletaire commented Aug 8, 2023

I've removed vite in favor of tsup because I've not been able to make work the bundles generated by vite properly (all I tried was causing context errors).

But everything related to bundling now works better:

  • Now ts files are used as entry points, meaning you won't need to run yarn build in a package when developing and trying stuff in other packages.
  • These ts files are now replaced on prepack using the clean-package package.
  • The resulting npmjs package ends up being the same as it's now, a properly bundled bundle of js files

I also had to reconsider how we were treating dependencies in some packages. The functionality is the same, we'll need to install react-markdown and its dependency because it's left as peerDependency. This is done this way because in the future we should try to set this dependency as optional (only enable markdown rendering if it is installed and detected).

closes #79

I've removed vite in favor of tsup because I've not been able to make
work the bundles generated by vite properly (all I tried was causing
context errors).

But everything related to bundling now works better:
- Now ts files are used as entry points, meaning you won't need to run
  `yarn build` in a package when developing and trying stuff in other
  packages.
- These ts files are now replaced on prepack using the clean-package
  package.
- The resulting npmjs package ends up being the same as it's now, a
  properly bundled bundle of js files

I also had to reconsider how we were treating dependencies in some
packages. The functionality is the same, we'll need to install
react-markdown and its dependency because it's left as peerDependency.
This is done this way because in the future we should try to set this
dependency as optional (only enable markdown rendering if it is
installed and detected).

rainbow-wallets should also be updated to use tsup, so it follows the
same principles as the other packages, and also so we can import it
without bundling issues.

refs #79
@elboletaire elboletaire marked this pull request as ready for review August 8, 2023 18:14
@elboletaire elboletaire merged commit 283bc3b into main Aug 8, 2023
1 check passed
@elboletaire elboletaire deleted the f/react-providers-79 branch August 8, 2023 18:18
@elboletaire
Copy link
Member Author

I may break things but... let's give it a try.

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.

Create providers package
1 participant