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
Runtime types generated when not used #239
Comments
I can reward a bounty to this issue if you are available to work. |
What is a good amount to reward to this bounty? |
I'm very unsure about how I'd evaluate that, sorry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a:
Which concerns:
Relates to #202.
What is the current behaviour?
Transforming a barebones file that imports types from a dependency causes that dependency to get imported, even if the types aren't used - and the runtime types aren't available.
In this particular case, I'm passing the
annotate: false
option tobabel-plugin-flow-runtime
to try and work around #202.Babel generates the following from the above file, which imports the
flow-aws-lambda
package; this package exports types, but does not export runtime types. I could try and use@babel/register
to work around this, but for my purposes I'd like to have babel spit out code that's directly executed bynode
, for auditing and deployment purposes.What is the expected behaviour?
Generate only those runtime types that actually get used (in this case, none), and omit the associated imports if any:
Along these lines, it'd also be nice to be able to disable annotations for a specific function, but I think for now disabling annotations just for specific files in babel's rc file will suffice.
Which package versions are you using?
[email protected]
[email protected]
The text was updated successfully, but these errors were encountered: