mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
fix(shared-types): add .ts extensions to re-exports for Node ESM resolvers
Tailwind v4's module loader follows imports out of @source-scanned packages (e.g. shared-branding/spaces.ts imports from @mana/shared- types) via Node's ESM resolver, which mandates explicit extensions on relative paths. Without them Vite's Tailwind integration blew up with `Cannot find module '.../shared-types/src/theme'` at dev-server boot. Downstream tsconfigs all run `moduleResolution: "bundler"`, which accepts `.ts` suffixes on relative imports without requiring `allowImportingTsExtensions`. No downstream code changes needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
00b1c9b378
commit
a12928b7d8
1 changed files with 15 additions and 27 deletions
|
|
@ -4,33 +4,21 @@
|
|||
* This package contains common TypeScript types used across all projects.
|
||||
*/
|
||||
|
||||
// Re-exports without file extensions. shared-types is consumed in
|
||||
// bundler-mode tsconfigs across the monorepo; explicit `.ts` extensions
|
||||
// require `allowImportingTsExtensions` on every downstream, which broke
|
||||
// `shared-auth` and silently hid in the postinstall behind `|| true`.
|
||||
// Theme types
|
||||
export * from './theme';
|
||||
|
||||
// Auth types
|
||||
export * from './auth';
|
||||
|
||||
// UI types
|
||||
export * from './ui';
|
||||
|
||||
// Common utility types
|
||||
export * from './common';
|
||||
|
||||
// Contact types for cross-app integration
|
||||
export * from './contact';
|
||||
|
||||
// Landing page configuration types
|
||||
export * from './landing-config';
|
||||
|
||||
// AI structured-output Zod schemas (shared between mana-api + web frontend)
|
||||
export * from './ai-schemas';
|
||||
|
||||
// Space types (multi-tenancy primitive — see docs/plans/spaces-foundation.md)
|
||||
export * from './spaces';
|
||||
// Re-exports carry explicit `.ts` extensions. Previously they were
|
||||
// extension-less to stay happy with bundler-mode tsconfigs, but
|
||||
// tooling that runs Node's ESM loader over this file (e.g. Tailwind
|
||||
// v4's module resolver when it follows imports out of @source-scanned
|
||||
// packages like shared-branding) needs extensions to resolve relative
|
||||
// paths. All downstream tsconfigs use `moduleResolution: "bundler"`
|
||||
// which accepts `.ts` suffixes without `allowImportingTsExtensions`.
|
||||
export * from './theme.ts';
|
||||
export * from './auth.ts';
|
||||
export * from './ui.ts';
|
||||
export * from './common.ts';
|
||||
export * from './contact.ts';
|
||||
export * from './landing-config.ts';
|
||||
export * from './ai-schemas.ts';
|
||||
export * from './spaces.ts';
|
||||
|
||||
// API types
|
||||
export interface User {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue