babel-plugin-replace-import-extension
JSON →A Babel plugin that replaces file extensions in import statements and dynamic imports during transpilation. Current stable version is 1.1.5, with irregular release cadence. It solves the problem of co-existing ESModule and CommonJS builds by rewriting relative imports (starting with ./ or ../) so that, for example, .js becomes .mjs or .cjs. Unlike other extension replacement approaches, it handles dynamic imports by injecting a __transformExtension helper and avoids changes to bare specifiers (node_modules). It works with @babel/transform-modules-commonjs and is configured via an extMapping option.
Traffic · last 30 days ↑33% vs prev 7d
total hits 17
actors 6 distinct systems
last hit 17h ago AhrefsBot
top countries 🇩🇪 Germany · 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇲🇽 Mexico