In large Node.js projects, relative imports can quickly get out of hand:
const logger = require("../../../../utils/logger");
So I built pathlra-aliaser — a small, fast path alias resolver for Node.js.
It lets you write clean imports like:
const logger = require("@utils/logger");
You define the alias once for a folder or a file
and then you can import it from anywhere in the project, as many times as you want,
without repeating long relative paths.
Aliases are resolved directly from package.json.
No Babel
No TypeScript
No build step
Just pure Node.js with zero dependencies.
It’s designed to stay fast even as projects grow, with built-in caching and predictable behavior.
github Repo:
https://github.com/hub-mgv/pathlra-aliaser
Top comments (0)