Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

First pass test matches ES6 modules as CommonJS modules making namedExports unusable #36

@qgustavor

Description

@qgustavor

From the source the first time test detects using an simple regular expression could be a CommonJS module, trying to find expressions like "require" and "exports". As it's a simple test sometimes it matches those expressions in strings and comments (example: "required" from Apache License), making it try to transform the file as a CommonJS module.

When transforming the file it ends up not finding any exports and normally it returns null, except when namedExports is used. Maybe it can be changed to a warning and/or the first pass test me improved in some way to ignore strings and comments.

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