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

[core:2.7.0-alpha.4] - Dynamically import Notify and Account Center #1207

Merged

Conversation

lnbc1QWFyb24
Copy link
Collaborator

Description

This PR dynamically imports both the Account Center and Notify code. For apps that have these features disabled, this will save ~35kb of user bandwidth on the initial JS download.

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • I have run yarn type-check & yarn build to confirm there are not any associated errors

{#await notifyComponent then Notify}
{#if Notify}
<svelte:component
this={Notify}
Copy link
Member

Choose a reason for hiding this comment

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

Sweet! I havent seen this approach before 🎸

@Adamj1232
Copy link
Member

@aaronbarnardsound Cool approach! I think we will want these core package changes in the React and Vue packages as well

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit 344d5b4 into v2-web3-onboard-develop Aug 12, 2022
@lnbc1QWFyb24 lnbc1QWFyb24 deleted the enhancement/dynamic-import-account-notify branch August 12, 2022 02:35
@lnbc1QWFyb24 lnbc1QWFyb24 mentioned this pull request Aug 12, 2022
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