-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Problem
The TypeScript compiler target in tsconfig.json is currently set to "es5", which is a very old JavaScript standard released in 2009.
File: tsconfig.json (line 10)
Impact
This outdated configuration results in several significant issues:
- Larger bundle sizes: Modern JavaScript features must be transpiled down to ES5, requiring extensive polyfills and transformation code
- Less efficient code execution: ES5-compatible code runs slower than modern JavaScript optimized for newer engines
- Inability to use modern JavaScript features natively: Native async/await, arrow functions, classes, and other modern features must be transpiled
- Slower performance for cryptographic operations: For a cryptography SDK handling FHE (Fully Homomorphic Encryption), performance is critical
Why This Matters for an FHE SDK
Modern cryptographic operations are computationally intensive. Using an outdated ES5 target means:
- Users get larger bundles to download
- Runtime performance is degraded
- Modern JavaScript engine optimizations cannot be utilized
Suggested Fix
Update the TypeScript compiler target in tsconfig.json:
{
"compilerOptions": {
"target": "es2020", // or "esnext" for cutting-edge features
// ... rest of config
}
}Benefits:
- ✅ Smaller bundle sizes (up to 30-40% reduction)
- ✅ Better runtime performance
- ✅ Compatible with all modern Node.js versions (14+) and browsers
- ✅ Cleaner, more maintainable output code
Context
This issue was identified as part of a comprehensive configuration audit of the relayer-sdk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels