Skip to content

Conversation

@Karrrthik7
Copy link

What?

Updated the i18n-routing example to replace deep relative imports with the @/ path alias.
All imports like ../../../i18n-config are now @/i18n-config. Added a local tsconfig.json to support the alias and a safe refactor helper. Changes are scoped to examples/i18n-routing only and do not modify framework code.

Why?

  • Improves readability and maintainability by removing fragile "../../../" imports.
  • Aligns the example with common TypeScript + Next.js conventions using path aliases.
  • Makes future refactors and file moves within the example less error-prone.
  • Keeps changes local to the example so framework behavior is unaffected.

How?

  • Replaced deep relative imports in:
    • page.tsx
    • layout.tsx
    • locale-switcher.tsx
    • counter.tsx
      with @/ aliases.
  • Added/updated tsconfig.json:
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": { "@/*": ["./*"] }
  }
}
@ijjk ijjk added the examples Issue was opened via the examples template. label Sep 12, 2025
@ijjk
Copy link
Member

ijjk commented Sep 12, 2025

Allow CI Workflow Run

  • approve CI run for commit: aef13b3

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@ijjk
Copy link
Member

ijjk commented Sep 12, 2025

Allow CI Workflow Run

  • approve CI run for commit: de46bd7

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@devjiwonchoi devjiwonchoi self-assigned this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples Issue was opened via the examples template.

3 participants