Babel 7 plugin that resolves webpack resolve aliases during Babel transpilation. Version 0.1.1, last updated in 2019, with no recent releases. It replaces require paths defined in webpack alias configuration, useful for unit testing environments where webpack is not used. Compared to the original Babel 6 version, it uses a simpler config option without lodash templates. The package is in early development and seeking feedback.
npm install babel-plugin-webpack-alias-7Verified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin and use webpack aliases in Babel.
Review the readme for changes; consider using the original Babel 6 plugin if more features are needed.
Ensure a webpack config file exists or provide the config option explicitly.
Do not rely on these options; they are not available in this version.
Remove lodash templates from the config path; use a static string path.
Run 'npm install --save-dev babel-plugin-webpack-alias-7' and ensure the package name is correct in .babelrc
Run 'npm install --save-dev webpack' or ensure webpack is a dependency
Remove 'findConfig' option; see documentation for current options
Use import.meta.url and fileURLToPath to get equivalent of __dirname