babel-plugin-transform-runtime-file-extensions
v2.0.0
Published
A Babel plugin that adds file extensions to Babel runtime import specifiers and require paths for Node.js ESM compatibility.
Downloads
192
Maintainers
Readme
babel-plugin-transform-runtime-file-extensions
A Babel plugin that adds file extensions to Babel runtime import
specifiers and require
paths for Node.js ESM compatibility.
This is a temporary workaround for babel/babel#8462.
Setup
To install from npm run:
npm install babel-plugin-transform-runtime-file-extensions --save-dev
Configure Babel to use the plugin, after @babel/plugin-transform-runtime
:
{
"plugins": ["@babel/transform-runtime", "transform-runtime-file-extensions"]
}