Github user bgould commented on the issue:

    https://github.com/apache/thrift/pull/1175
  
    @zertosh can you elaborate on
    
    > Alternatively, how do you feel about making the require call for this 
module 
configurable?(https://github.com/apache/thrift/blob/e1832c354391deb0e0ce94a62ff32e8ce1c83fd3/compiler/cpp/src/thrift/generate/t_js_generator.cc#L412)
    
    Here's why I'm interested... I run the node library through browserify 
which works but by default produces a much larger glob of javascript than I 
really need, due to all of the thrift node components requiring that file which 
pulls in all of the other components whether I need them or not (eg I don't 
want to pull in TCompactProtocol or TFramedTransport etc if I'm just using 
TXHRTransport and TBinaryProtocol in the browser).  At the moment I'm using 
some local edits to reduce what gets included by `require('thrift')` but IIRC 
the last time I looked at it, I came to the conclusion that the 
`require('thrift')` might not be needed at all (i.e., the modules that it 
aggregates can just be included explicitly and individually as needed).  I 
would make code in the compiler possibly a bit more complicated but it could be 
worth the effort.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to