Preparing for system design interviews?  Try bugzed.com →

babel-plugin-root-import

JSON →
library 5.4.0 ·javascript
verified Jun 17, 2026

A Babel plugin that allows you to use root-based import paths (e.g., `~/foo`) instead of long relative paths (`../../../foo`). The current stable version is v5.4.0, with an active maintenance status (the latest release v6.6.0 came later but the package appears to be maintained). It supports custom prefix and suffix, multiple path mappings, and works with both `import` and `require`. Compared to Webpack's alias feature, this plugin operates at the Babel level, making it useful for tools like `babel-node` and testing environments where Webpack resolve is not available. It requires Babel 7 (or 6 depending on version).

total hits 17
actors 4 distinct systems
last hit 20d ago AhrefsBot
ByteDance
7
GPTBot
4
Script
1
Humans
1

top countries 🇨🇦 Canada · 🇨🇳 China · 🇸🇬 Singapore · 🇺🇸 United States · 🇩🇪 Germany