Skip to content
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

ES module #37

Open
larslaade opened this issue Jul 26, 2022 · 4 comments · May be fixed by #38
Open

ES module #37

larslaade opened this issue Jul 26, 2022 · 4 comments · May be fixed by #38

Comments

@larslaade
Copy link
Contributor

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?

@DracoBlue
Copy link
Owner

DracoBlue commented Jul 26, 2022

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?

@larslaade
Copy link
Contributor Author

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 :)

@DracoBlue
Copy link
Owner

Have fun!

@DracoBlue
Copy link
Owner

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

@larslaade larslaade linked a pull request Oct 31, 2022 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants