Skip to content

Interaction with export * from #5

@nicolo-ribaudo

Description

@nicolo-ribaudo

Consider this example:

// entrypoint.js
import { foo } from "./a.js";
// a.js
export * from "./b.js";
// b.js
export defer { foo } from "./foo.js";
export defer { bar } from "./bar.js";

Will it load bar.js? We have two possible answers:

  • Yes: export * from is loading all the bindings from ./b.js, so it's loading bar. It's equivalent to export { foo, bar } from
  • No: The bar binging is not actually listed anywhere. Deferred re-exports are only loaded when the relative binding is explicitly present in a { ... } from list.

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