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

Generate proper es6 modules #2

Open
jak-pan opened this issue Mar 16, 2021 · 3 comments
Open

Generate proper es6 modules #2

jak-pan opened this issue Mar 16, 2021 · 3 comments
Assignees

Comments

@jak-pan
Copy link
Contributor

jak-pan commented Mar 16, 2021

Currently we are generating invalid ES6 code. We should only have one export. Maybe we can generate 2 separate things for Node.js and Browser scopes respectively?

@enthusiastmartin
Copy link
Contributor

So, i can build for different target.

Please look at the attached files with build packages and let me know if suitable.

web.zip
node.zip

@jak-pan
Copy link
Contributor Author

jak-pan commented Mar 16, 2021

Actually. We'll need both rustwasm/team#38 (comment)
We need to have it working in both Node.js and web and maybe also webpack? As far as I read, this it's about generating proper package.json with proper inputs inside and then we can pack this and use it as a module everywhere.

@nohaapav nohaapav self-assigned this Sep 3, 2022
@nohaapav
Copy link
Member

nohaapav commented Sep 3, 2022

What we need to do is to properly link module & main in package.json .. So in the end we will have 3 modules for

  • xyk
  • lbp
  • stableswap
    each with CLJ & ESM support .. wasm-pack is generating correct files, but packaging is not one of the best(single module) ..
    Have to write some script to make job done .. maybe esbuild can help with better packaging

I'll take care of this as SDK is highly dependant on correct packaging of our wasms ;)

nohaapav added a commit that referenced this issue Sep 4, 2022
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

No branches or pull requests

3 participants