-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(webpack): allow babel plugins to be defined by function #7443
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #7443 +/- ##
==========================================
+ Coverage 70.23% 70.25% +0.01%
==========================================
Files 88 88
Lines 3699 3701 +2
Branches 1009 1010 +1
==========================================
+ Hits 2598 2600 +2
Misses 893 893
Partials 208 208
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good, can you please add some unit tests ?
@pi0 This may also needs ts type definition change?
@clarkdo I'm happy to put a PR into |
I think @pi0 is migrating types to core repo now. |
Types package is already moved here (#7432). Would be nice also updating it :) |
This PR allows
build.babel.plugins
to be a function that receives context and returns Babel plugins.Types of changes
Description
With the new format for
babel-polyfills
it may be important to pass targets to Babel plugins, which will likely vary byisModern
.So, in line with the current
presets
configuration, it would be appropriate forplugins
to take a function.Checklist: