Skip to content

Conversation

@lnbc1QWFyb24
Copy link
Contributor

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
Contributor

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
Contributor

@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.

5 participants