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

[TF-810] Reduce client bundle size for nextjs themes #34

Merged
merged 11 commits into from
May 27, 2022

Conversation

riffbyte
Copy link
Contributor

@riffbyte riffbyte commented May 26, 2022

Key changes:

  • Re-arranged code to make more sense structure-wise, and to isolate the code that should only be used on server-side. Some parts of the code still get bundled to the client, but it looks like the only proper way to solve that would be to migrate to ESM modules, which is a task in of an itself. 21 Kb saved
  • Get rid of string-strip-html library in favor of a new SDK about_plaintext property. 50 Kb saved
  • Sitemap props fetching helper is now intended to be used in getServerSideProps, not getInitialProps

@riffbyte riffbyte self-assigned this May 26, 2022
@linear
Copy link

linear bot commented May 26, 2022

TF-810 Reduce bundle size for NextJS Themes

This doesn't look good:

image.png

Need to check if some server-only code is leaking into the client bundle (this was the main offender in the bundle size for the website).

@riffbyte riffbyte requested a review from kudlajz May 26, 2022 13:38
@riffbyte riffbyte merged commit 789eedc into main May 27, 2022
@riffbyte riffbyte deleted the feature/tf-810-reduce-bundle-size-for-nextjs-themes branch May 27, 2022 08:14
e1himself pushed a commit that referenced this pull request Oct 17, 2023
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.

1 participant