fix(shared): drop .js extensions from relative imports for Metro

packages/shared/src/index.ts and all sub-modules used .js extensions on
relative imports (e.g. './admin/index.js') pointing at .ts source files.
TypeScript with moduleResolution: "Bundler" doesn't need them, and
Metro's eager exporter (used for preview / production builds) reads
them literally and fails — only the dev-server Metro fell back to .ts.

Workspace typecheck remains 8/8 green; Vite and TS Bundler resolution
already accept both styles, so desktop is unaffected.
This commit is contained in:
byGalax
2026-05-15 01:52:14 +02:00
parent b0967dd2c5
commit b61f929cf7
25 changed files with 108 additions and 108 deletions
+7 -7
View File
@@ -1,12 +1,12 @@
import i18next, { type i18n as I18nInstance, type Resource } from 'i18next';
import i18next, { type i18n as I18nInstance, type Resource } from 'i18next';
import { initReactI18next } from 'react-i18next';
import { resources } from './resources.js';
import { DEFAULT_LOCALE, type SupportedLocale } from './types.js';
import { resources } from './resources';
import { DEFAULT_LOCALE, type SupportedLocale } from './types';
export * from './detect.js';
export * from './error-map.js';
export * from './types.js';
export * from './detect';
export * from './error-map';
export * from './types';
export interface InitI18nOptions {
initialLocale: SupportedLocale;
@@ -14,7 +14,7 @@ export interface InitI18nOptions {
onLanguageChanged?: (locale: SupportedLocale) => void;
}
// Idempotent init safe to call from multiple entry points.
// Idempotent init — safe to call from multiple entry points.
// Returns the configured i18next instance.
export function initI18n(options: InitI18nOptions): I18nInstance {
if (!i18next.isInitialized) {