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
Common JS to ES6/7 modules - WIP #3427
Conversation
Thanks to @gasi All this would now need is |
@Cmdv I've managed to get import statements working with language-javascript, see erikd/language-javascript#82. With that in mind, do you think you're likely to pick this back up again soon? |
@hdgarrood ah cool that's ace, had totally forgotten about this! I think I had a funny trailing |
I also have some WIP for generating ES2015 (ES6). I think supporting |
Is it the case, then, that if @erikd releases a new |
@purcell If and when you want a new release of language-javascript, let me know. |
No, there's still a lot more work which would need doing after a new version of language-javascript gets released to be able to ship ES modules in the PureScript compiler. It's also a big breaking change with the risk of causing a lot of pain throughout the ecosystem if executed poorly, so it's definitely not something we want to rush. @erikd I'd suggest waiting until we have complete support for |
Cool, thanks for clarifying, and that makes total sense. I'm not familiar with the chain of dependencies, so I'll see if I can bring myself up to speed and find a way to help out. |
I'm terribly sorry, I've not had the chance to get this completed. |
I'm really interested in this. Maybe I'll get some time next week to learn how it works. |
I think probably the best way forward with this is to start by contributing more complete support for ES2015+ |
I don’t think that’s necessary. To move faster on this, we could decide to only support the minimal subset of
Beyond that, what I would propose for a gradual rollout would be:
WIP
|
I also have some thoughts on this, but a PR probably isn't the best place to discuss. We have a few issues covering ES modules but they are fairly old and have a lot of discussion on them, so I think it's time to close them as well, and make a new issue for this. edit: see #3613 |
(for the avoidance of doubt I'm in the process of doing this). |
cheers @hdgarrood for taking this on, just couldn't ever find the time to complete it!! 👍 |
This is a continuation of #3379, don't have creds to re-open PR as I closed it.
This does currently work but it's not getting full benefits because any FFI usage still uses CJS so any Dead Code Elimination can't be used through out the whole codebase so this is still a WIP.
For the ability to have ES6/7 FFI we need to add the new ES6/7
import
&export
specs to language-javascriptTo do:
language-javascript
Support Export Statements - WIP erikd/language-javascript#78language-javascript
Support Import Statements - WIP erikd/language-javascript#77import/export
here;