Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support es-module default exports in babel plugins #1160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marshallswain
Copy link
Contributor

This adds support for babel plugins that use ES modules that use the default export. The problem was that somewhere in this plugins array the module paths were being replaced by the required modules. An ES module would become replaced by { isEsModule: true, default: Fn }, which wouldn't pass the isPluginFunction(plugin) conditional on subsequent calls to processPlugins.

The 3-line change in this PR just check for the presence of pluginFn.default and use that as pluginFn.

Copy link
Contributor

@bmomberger-bitovi bmomberger-bitovi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants