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

refactor: Migrate to vite as bundler #1931

Merged
merged 4 commits into from
Mar 4, 2025
Merged

refactor: Migrate to vite as bundler #1931

merged 4 commits into from
Mar 4, 2025

Conversation

Danielku15
Copy link
Member

@Danielku15 Danielku15 commented Mar 4, 2025

Proposed changes

This PR migrates to use Vite as bundler in alphaTab. While we still use only rollup under the hood (no ESBuild) this brings quite some benefits:

  • We can now use the Vite Dev Server instead of a custom express instance.
    • We can rely on on-the-fly transpilation while developing and testing which is significantly faster and less prone to errors.
    • We can already check how alphaTab will behave in future when we go for modular publishes (instead of having a huge bundle).
    • We have hot-reload while developing (reloading also the playground dynamically)
  • We can evaluate the use of ESBuild for even faster builds.

The output of esbuild has been verified to be the same as before.

One drawback is that we have now multiple individual builds as Vite doesn't support multiple build configurations built at once. This increases a bit complexity in the NPM scripts and makes the full build a bit slower.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@Danielku15 Danielku15 self-assigned this Mar 4, 2025
@Danielku15 Danielku15 merged commit af692f2 into develop Mar 4, 2025
4 checks passed
@Danielku15 Danielku15 deleted the feature/vite branch March 4, 2025 18:24
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