Skip to content

Parse Re-exporting / Aggregating exports. #42

@tcK1

Description

@tcK1

Environment

magicast: 0.2.3
Node: v16.17.0

Reproduction

Codesandbox.

import { parseModule } from "magicast";

const mod = parseModule(`
  export { default as function1, function2 } from "bar.js";
  export { default } from "foo.js";

  export { x } from "mod";
  export { x as v } from "mod";
  export * as ns from "mod";
`);

Describe the bug

Not sure if it's a bug or a feature request, but re-exporting files are not being "indexed" as neither imports nor exports. For reference, es-module-lexer parses them as imports.

I took the examples from MDN.

Additional context

No response

Logs

No response

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