istio.io
istio.io copied to clipboard
LFX'25:Update the pipeline to achieve clean build without any errors
Description
This PR replaces Babel with esbuild as the build tool for this repository. The main goals of this is to improve build performance, reduce configuration complexity, modernize the toolchain, and generate cleaner builds.
Overview
Babel has served as a popular JavaScript transpiler for years, but it comes with some downsides in the context of modern library development:
- Performance bottlenecks: Babel is significantly slower, especially on large codebases or repeated builds
- Maintenance concerns: Many Babel plugins and presets are either deprecated, minimally maintained, or lag behind the evolving JavaScript standard.
- Unnecessary complexity: Babel's plugin-based architecture leads to verbose and often brittle configurations
esbuild, on the other hand, is designed for speed and simplicity, with modern JavaScript/TypeScript support and built-in minification and bundling.
Technical Changes
Removed
- Babel related dependencies
@babel/core@babel/preset-envAnyother babel related dependency
Added
esbuildas a dev dependency
- A new build script using esbuild, capable of:
- Transpiling modern JavaScript (ES6+) to target environments
- Minimification of Javascript files to achieve faster builds
Testing
- The output structure and exports matches with previous Babel generated output
- The site is build successfully without having any errors or warnings
Result
- Simplified build setup with fewer and less boilerplate dependencies
- More future-proof and modern toolchain
Reviewers
- [ ] Ambient
- [ ] Docs
- [ ] Installation
- [ ] Networking
- [ ] Performance and Scalability
- [ ] Extensions and Telemetry
- [ ] Security
- [ ] Test and Release
- [ ] User Experience
- [ ] Developer Infrastructure
- [ ] Localization/Translation