Skip to content

option to generate an es module instead of commonjs module #663

Description

@mreinstein

Issue type

Feature Request:

Description

When pegjs produces an output .js file, it is in common js format:

module.exports = {
  SyntaxError: peg$SyntaxError,
  parse:       peg$parse
};

I want the output as an es module instead:

export { peg$parse as parse, peg$SyntaxError as SyntaxError };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions