Skip to content

v2.0.0: From Astro to Svelte + Vite

Latest
Compare
Choose a tag to compare
@matschik matschik released this 03 Jan 00:45
· 166 commits to main since this release
be52cbc

Build change

Component Party has grown very fast since its first release. There has been a big impact on the performance of the page.
The solution is to go from full static with Astro (30 000 DOM Nodes) to a Svelte SPA to greatly improve performance:

  • JS will contain DOM Nodes not displayed
  • Framework snippets will be downloaded on demand (lazy loading)

While Astro is really great to make static websites, Component Party needs to be an SPA to have the best performance possible.

Before (using Astro)

210130572-d114434b-a83a-40d5-84c1-6dbb82b2f92c

After (using Svelte + Vite)

Capture d’écran 2023-01-03 à 01 40 58
The performance seems much better ! 💯

Additional features

While refactoring, we added additional features:

  • Switch font from Inter to Mona Sans
  • Use Shiki as the code highlighter using "One Dark Pro" theme
  • Improve "edit on Github" button placement
  • Add clipboard notification
  • Add message on zero framework selected case

Related PR: #131