jsb
jsb copied to clipboard
ES module
Hi, would you like to re-structure jsb as an ES module? I have currently a branch with half the work done. But some questions are still open:
- In a world of bundlers, do jsb still need requirejs support? requirejs do not support ESM out of the box, that might be a problem. Maybe finding another hook/callback/event/whatever to init unknown modules by the user themself.
- Would you like to have a build process (rollup would be good fit) to include more formats (esm, umd, cjs)?
- Code in TypeScript?
What do you think?
Hello!
Thanks a lot for your contribution!
I think for next jsb major version 4.x those suggestions are great.
So a native ES module is really appreciated. If you link in the readme to the old branch (we create one for people who need old support called release/3.x) that would be great.
About rollup or other formats: good idea!
About typescript: let's keep it non-typescript in terms of .js file. But if possible add a definitions file for ts to make integration for typescript users easier.
What do you think?
Ok, glad you like the ideas.
Linking to a previous release is a good idea. Rollup: i will add this. Typescript definitions are a good compromise.
So happy coding for me i think :)
Have fun!
I will in your branch (when back from holidays) add github actions (feel free to add them on your own) for npm release logic. We need to get rid of travis-ci