Skip to main content

πŸ“¦ Depedencies

Centralized Dependency Export


🧠 What is this file?​

The depts.ts file serves as a centralized entry point for all major external and internal dependencies used throughout the project.

Rather than importing dependencies from their original paths in every file, we group and re-export them here, under a single unified module. This improves maintainability, readability, and scalability of the codebase.


πŸš€ Why is it useful?​

  • βœ… Simplified imports: Avoid deep or repetitive import paths across the codebase.
  • 🧹 Cleaner project structure: Centralizes third-party and internal module references.
  • πŸ› οΈ Easy updates: If a library path changes or is swapped out, only one file needs to be updated.
  • 🧭 Better navigation: Developers can quickly see all major dependencies in one place.

πŸ”§ How to use it

Thanks to a Webpack/Vite alias (@depts), any file in the project can import dependencies like this:

import { uuid, vvComponents, vvAPI, vvExcel } from '@depts';
warning

No need to write:

import { v4 as uuidv4 } from 'uuid';
import { Button } from '@infrasoftbe/infrasoft-ui-components';
import { fetchSomething } from '@infrasoftbe/infrasoft-vnv-api-kit';

πŸ“š Dependencies included​

AliasSource PackageDescription
uuiduuidUUID generation utilities
vvComponents@infrasoftbe/infrasoft-ui-componentsInfrasoft’s internal UI component library
vvAPI@infrasoftbe/infrasoft-vnv-api-kitAPI client for VnV tool
vvExcel@infrasoftbe/infrasoft-vnv-excel-generatorExcel export/generation tools