Skip to content

Dynamic import doesn't work with external that defines a function #6985

Closed
@anmonteiro

Description

@anmonteiro

#6663 fixed an issue where @module("..") external .. would also emit a static import. But it looks like external + dynamic import isn't very well supported if the external is an arrow. Here's a playground link.

Wondering if that's on purpose or an oversight. Obviously you can extract the arrow to type f = string => unit or something along those lines, but that disables a few optimizations and you can't use attributes such as @unwrap and friends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions