diff --git a/apps/frontend/jest.config.js b/apps/frontend/jest.config.js index 7c16244..0d5231c 100644 --- a/apps/frontend/jest.config.js +++ b/apps/frontend/jest.config.js @@ -12,7 +12,10 @@ const customConfig = { ], testPathIgnorePatterns: ['/node_modules/', '/.next/', '/e2e/'], moduleNameMapper: { + // Ces deux alias ne pointent pas vers `src/` : ils doivent precede la regle + // generique, sans quoi `@/i18n/navigation` est cherche dans `src/i18n`. '^@/app/(.*)$': '/app/$1', + '^@/i18n/(.*)$': '/i18n/$1', '^@/(.*)$': '/src/$1', }, }; diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json index b5726d1..b9d7f6c 100644 --- a/apps/frontend/tsconfig.json +++ b/apps/frontend/tsconfig.json @@ -20,15 +20,15 @@ } ], "paths": { - "@/*": ["./src/*"], + "@/app/*": ["./app/*"], + "@/i18n/*": ["./i18n/*"], "@/components/*": ["./src/components/*"], "@/lib/*": ["./src/lib/*"], - "@/app/*": ["./app/*"], "@/types/*": ["./src/types/*"], "@/hooks/*": ["./src/hooks/*"], "@/utils/*": ["./src/utils/*"], "@/pages/*": ["./src/pages/*"], - "@/i18n/*": ["./i18n/*"] + "@/*": ["./src/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],