-
Notifications
You must be signed in to change notification settings - Fork 25k
[Packager] Allow user to specify a custom transformer file #1458
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
Conversation
|
cc @amasad. did you want .babelrc though? |
|
@ide I thought this might be interesting in addition to .babelrc - in case someone wants to use a different transpiler or do other stuff during transpilation (who knows?) |
|
That makes sense. Maybe let the path be relative to cwd? |
|
Yeah that would be possible. I didn't do that yet because I wanted to keep the default value from the options. If we make the path relative to the cwd and the user would use |
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.
just add the require.resolve('./transformer') here
|
@ide looks like we get |
|
@amasad Your suggestion did not quite work as it didn't allow the user to use a cwd-relative path after all. I've added a check now whether we are being given an absolute path as option. That works quite well. Unfortunately I deleted my fork, while cleaning up my account... I tried to restore everything to be able to push to this branch again, but it didn't work properly. That's why I had to open up a new PR over at #1497. Sorry for the mess :/ |
Summary: This is an edited re-submission of facebook#1458 because I'm stupid. Closes facebook#1497 Github Author: Johannes Lumpe <[email protected]> Test Plan: Imported from GitHub, without a `Test Plan:` line.
With this new options users can specify their own transformer file.