From bb278fb3cf5ff37f5dbd6b3f71f3f968413657b0 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 14 Apr 2026 20:44:18 +0200 Subject: [PATCH] fix(types): use .js extensions for shared-types re-exports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 93bb94a12 dropped the extensions on shared-types re-exports to make the web app's svelte-check pass (its tsconfig has no allowImportingTsExtensions). That satisfied tsc but broke SSR: the dev server tripped with ERR_MODULE_NOT_FOUND on every (app) route because Node's native ESM loader (used by downstream tooling like @tailwindcss/node) cannot resolve bare relative specifiers without an extension, and only Vite-owned paths got the bundler-style resolution the fix relied on. Switch to the TypeScript-ESM idiomatic `.js` extension. tsc with moduleResolution: "bundler" still type-checks against the actual .ts source, and at runtime both Vite and Node resolve `.js` the same way — no tsconfig flag flip required. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/shared-types/src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/shared-types/src/index.ts b/packages/shared-types/src/index.ts index d3bc3d705..3b5047f00 100644 --- a/packages/shared-types/src/index.ts +++ b/packages/shared-types/src/index.ts @@ -5,25 +5,25 @@ */ // Theme types -export * from './theme'; +export * from './theme.js'; // Auth types -export * from './auth'; +export * from './auth.js'; // UI types -export * from './ui'; +export * from './ui.js'; // Common utility types -export * from './common'; +export * from './common.js'; // Contact types for cross-app integration -export * from './contact'; +export * from './contact.js'; // Landing page configuration types -export * from './landing-config'; +export * from './landing-config.js'; // AI structured-output Zod schemas (shared between mana-api + web frontend) -export * from './ai-schemas'; +export * from './ai-schemas.js'; // API types export interface User {