babel-plugin-bare-import-rewrite

JSON →
library 2.0.0 ·javascript
verified May 27, 2026

A Babel plugin that rewrites bare import specifiers (like 'lodash') to browser-compatible URL-based paths for use without a bundler, currently at stable version 2.0.0. It resolves bare imports to absolute or relative URLs pointing to node_modules on a web server, with configurable options like modulesDir, alwaysRootImport, and ignorePrefixes. This plugin is a pragmatic solution until native import maps gain full browser support, making it distinct from bundler-based approaches like Webpack or Rollup. It supports ESM, CJS, and TypeScript projects using Babel, actively maintained, and requires @babel/core >=7.8.3.

total hits 26
actors 6 distinct systems
last hit 2d ago AhrefsBot
ByteDance
9
MetaBot
4
GPTBot
2
Script
1
Humans
2

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