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

Import keyword in JS Lua module #73

Open
mbekkomo opened this issue Aug 1, 2022 · 2 comments
Open

Import keyword in JS Lua module #73

mbekkomo opened this issue Aug 1, 2022 · 2 comments

Comments

@mbekkomo
Copy link

mbekkomo commented Aug 1, 2022

Hello, I have noticed some JS package has been used the ESModule instead CommonJS. Its annoying since there's no built-in JS function in lua like js.import.

Does the team have a plan to add import keyword onto JS Lua module?

@daurnimator daurnimator transferred this issue from fengari-lua/fengari Aug 12, 2022
@daurnimator
Copy link
Member

Sure, I think we'd accept a pull request adding a js.import() function that uses a dynamic import

Though note that dynamic import returns a promise, which are not currently handled automatically by fengari (see #2)

@AsynchronousAI
Copy link

I think this would be EXTREMELY helpful. I might make a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants