-
Notifications
You must be signed in to change notification settings - Fork 414
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
Make Module.transform configurable from evaluate #247
Conversation
Hey @giuseppeg, thank you for your pull request 🤗. |
src/babel/evaluate.js
Outdated
@@ -58,7 +58,8 @@ const resolve = (path, t, requirements) => { | |||
module.exports = function evaluate( | |||
path /* : any */, | |||
t /* : any */, | |||
filename /* : string */ | |||
filename /* : string */, | |||
transform /* : ?(text: string) => { code: string } */ = null |
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.
Thanks for the PR!
Just a nit
, but can you extract the defaultTransform
function to top of this function and use default parameter here? I think it'll be simpler.
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.
good idea thanks, done :)
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.
let me know if you prefer transform
over transformModule
awesome, thank you guys! :) |
Replacement of #246