-
Notifications
You must be signed in to change notification settings - Fork 383
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
Support import/export aka modules #348
Comments
What does the code look like for selecting the actual file/module? Something like this in my head if my question isn't clear.
|
Sorry for the slow reply @faisalraja , there has been some holidays ;). The API is far from complete (everything really is) - but no. In order for the possibility of having not JS modules, but for example having some made by the host environment (the program inside which the JS is running), the specification specifies (:wink:) HostResolveImportedModule which returns an instance of a Module(Record). So that means that you will need, if the Module that is being imported is a text module(js code basically), to parse it and then return it as shown in the tc39_test.go changes we have done: I would like to also note that all of this code is a PoC/WIP, and it still doesn't work, which hopefully will take me a day or two to fix. And after it actually works |
A draft PR has been opened 🎉 |
I am adding this issue mostly to say that I and @oleiade will be working on it this week and hopefully will have at least a WIP/PoC PR by the end of it, in case somebody else decides to work on it in the meantime.
After we have made some progress and have nailed down some things I will update this issue with more info
The text was updated successfully, but these errors were encountered: