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

build: remove babel-plugin-add-module-exports #421

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

ctavan
Copy link
Member

@ctavan ctavan commented Apr 23, 2020

Since we have deprecated deep requires we no longer need the module.exports from the individual v*.js files.

Since we now ship plain, non-babled deep require files on the top level of the npm package for legacy CommonJS deep-require support we can compensate for the lack of module.exports in there and instead simply access the "default" export of the algorithm-specific modules.

This change was inspired by webpack/webpack#7973 (comment)


I stumbled upon this one on my struggle to finally make some progress on #402. While this doesn't help with #402 it's certainly no longer necessary and anything we can do to simplify our build pipeline is always welcome I guess.

Since we have deprecated deep requires we no longer need the
module.exports from the individual v*.js files.

Since we now ship plain, non-babled deep require files on the top level
of the npm package for legacy CommonJS deep-require support we can
compensate for the lack of module.exports in there and instead simply
access the "default" export of the algorithm-specific modules.

This change was inspired by
webpack/webpack#7973 (comment)
@ctavan ctavan requested review from broofa and LinusU April 23, 2020 21:27
@ctavan ctavan force-pushed the remove-babel-plugin-add-module-exports branch 2 times, most recently from 4b65163 to 8c8ac91 Compare April 23, 2020 21:30
Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

Neat 👍

@ctavan ctavan merged commit f97fea0 into master Apr 24, 2020
@ctavan ctavan deleted the remove-babel-plugin-add-module-exports branch April 24, 2020 07:03
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