Skip to content

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.

@marshallswain marshallswain force-pushed the handle-plugin-esmodules branch from c8baaf1 to 6ada067 Compare August 26, 2021 17:05
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.

3 participants