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

Fix dynamic Import issue with function-defined externals #7060

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

mununki
Copy link
Member

@mununki mununki commented Sep 30, 2024

Fixes #6985

This PR fixes that the dynamic imports don't work correctly with external declarations that define functions.

@module("mylib") external f: string => unit = "default"
let mylibF = Js.import(f)

compiled to

let mylibF = import("mylib").then(m => m.default);

@zth
Copy link
Collaborator

zth commented Oct 1, 2024

I'm not familiar with this part of the code base, but it looks good to me from what I can tell. @cristianoc ?

@mununki mununki merged commit 70700fe into master Oct 1, 2024
20 checks passed
@mununki mununki deleted the fix-fun-dynamic-import branch October 1, 2024 17:18
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 this pull request may close these issues.

Dynamic import doesn't work with external that defines a function
3 participants