Skip to content

Dynamic import enhanced #6194

@mununki

Description

@mununki

A few more points to consider include:

  1. Destructuring assignment for dynamic import of value
    It is said that modern bundlers perform tree-shaking for expressions like let {forEach} = ... If possible, it might be worth generating JavaScript output like var {forEach} = ...

  2. The current implementation uses the module_system to find the path:string corresponding to the module_id, but it does not consider cases when there are multiple module_systems. Also, within the Js_name_of_module_id.string_of_module_id function, Js_packages_state.get_packages_info () is being used. The same function was used in the place where Pimport was compiled.

Metadata

Metadata

Assignees

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