Hi @Jon_Page and @Jason_Aeschliman,
Thank you for your question about platform-specific file extensions for Vega OS.
Current Status
Platform-specific file extensions are fully supported and documented as of SDK 0.22.
Official Documentation: Platform-Specific Code for Vega OS
Key Points
- Use .kepler extension (not .vega)
The platform uses kepler internally:
Button.kepler.tsx
utils.kepler.js
Button.vega.tsx (not supported)
Supported extensions: .kepler.tsx, .kepler.ts, .kepler.jsx, .kepler.js
- Platform Detection
import { Platform } from 'react-native';
if (Platform.OS === 'kepler') {
// Vega-specific code
}
- Tree Shaking
Fully supported - only .kepler files are included in Vega builds.
Regarding .vega Extensions
The .vega extension is not supported and there are no plans to support it. The Vega platform team has confirmed that .kepler will remain the standard for the foreseeable future to ensure backward compatibility and ecosystem consistency.
Regarding Custom Extensions
@Jason_Aeschliman - Custom extensions beyond .kepler are not officially supported. The platform resolution is tied to the SDK’s Metro bundler configuration, which only recognizes standard React Native extensions (.ios, .android, .native) plus .kepler.
Why .kepler?
While CLI commands moved to the vega namespace in SDK 0.22, the platform identifier remains kepler for backward compatibility with existing apps and the React Native ecosystem.
Resources
Let me know if you have any questions!
Thanks for helping us improve the Vega platform.
Warm regards,
Aishwarya