tri613 commented on PR #3083:
URL: https://github.com/apache/thrift/pull/3083#issuecomment-2591571346

   Hello! Thanks for this great PR again. 👍 
   
   > import statements are not changed to the esm format
   
   We tried to use this PR's changes to build our own service, and when looking 
inside the generated files, we noticed that the import statements are like this:
   ```
   // FooService.mjs
   import { Thrift } from 'thrift';
   import { Q } from 'thrift';
   import Int64 from 'node-int64';
   var Foo_ttypes = require('./Foo_types');
   var Bar_ttypes = require('./Bar_types');
   ```
   
   As @thomasbruggink suggested we think this is related to the 
`render_includes` function at line 584.
   
   > Is your plan here to support es modules that can directly execute in the 
browser, with no build tools at all?
   
   We had some issues when integrating the nodejs thrift build into our 
project, so we thought it would be nice if we could decouple the esm build from 
the nodejs dependencies. And of course, supporting native esm browser packages 
would be beneficial too :D 
   However, it is good to know that the nodejs version worked for you - I will 
take another look and check if we are missing anything in our project's build 
tool!
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to