-
Notifications
You must be signed in to change notification settings - Fork 36
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
Use vite for bundling #214
base: development
Are you sure you want to change the base?
Conversation
have you looked at vite library mode. Its probably overkill, but would allow us to create a demo wallet alongside the lib |
Yes, good idea. This PR actually introduces library mode. I think all the is required to make a dev env work, would be to add a index.html file and reference the lib's index file in there. Building a simple wallet interface or at least some buttons to test the public API against a local test mint is a good idea IMHO. I also do not think its overkill. It also allows implementers to use their browser as a sort of scratch pad for testing without having to write a test file. However I think this should be introduced in a separate PR. Where you able to include this PRs output in your projects without any bundling issues @gudnuf ? |
Description
This PR adds
vite
for bundling and transpiling this library. Vite has become an industry standard, using rollup and esbuild under the hood. tsc is still kept, but only used for type checking and declarations. It also adds a standalone build that is made availabel through jsdelivr.The PR also changes the build targets to ES2020 (from lowest ES5) and changes some of the export structure. While technically a breaking change, this should not affect downstream, as exports / imports are usually handled by the package manager / bundler.
Changes
PR Tasks
npm run test
--> no failing unit testsnpm run format