Vega Platform-specific file extension support

Since 0.22 is out now, and most cli commands have been moved to the vega namespace, is there any update or indication on when/if React Native platform specific file extensions (component.kepler.tsx) for vega (component.vega.tsx) will be supported?

I am aware that kepler ones work, but is there any indication on changes to the namespace for platform specific extensions?

The only discussion I see about this is here:

Seconding.

I would also like to know if there is support for our own custom extensions in some cases (some experimentation on my part failed to produce the result I expected there, unclear if it is tied to the SDK).

Hi @Jon_Page , @Jason_Aeschliman

Thank you for your question about Vega platform-specific file extension support.

Our team is looking into this and will provide an update as soon as we have more information regarding support for .vega.tsx extensions and custom platform-specific file naming conventions.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya

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

  1. Use .kepler extension (not .vega)

The platform uses kepler internally:
:white_check_mark: Button.kepler.tsx
:white_check_mark: utils.kepler.js
:cross_mark: Button.vega.tsx (not supported)

Supported extensions: .kepler.tsx, .kepler.ts, .kepler.jsx, .kepler.js

  1. Platform Detection
import { Platform } from 'react-native';

if (Platform.OS === 'kepler') {
  // Vega-specific code
}
  1. 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

Thanks for the response, could there not be both vega and kepler namespaces for forward compatability?

Hi @Jon_Page,

Thank you for your question about supporting both .vega and .kepler namespaces.

The team has decided to maintain .kepler as the standard for the foreseeable future. Any future transitions will be announced through our official platform release notes.

For now: Continue using .kepler.tsx and Platform.OS === 'kepler'.

Feel free to reach back to me if you have any questions!

Warm regards,
Aishwarya

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.