Skip to content
This repository was archived by the owner on May 20, 2022. It is now read-only.
This repository was archived by the owner on May 20, 2022. It is now read-only.

Comments are removed from code, even for files with no JSX #19

Description

@odzb

If nativejsx encounters a source code file where there is no JSX (which is the majority of files in my 200 KLOC project), it still passes the file through its parser and code generator, which results in comments being removed and string quote style being changed.

What I'd like to see, ideally:

  1. Comments to be retained everywhere. It's the minifier's job to remove them at a later stage in non-debug builds. As far as I understand, these instructions need to be followed to achieve this: https://github.com/ternjs/acorn#note-on-using-with-escodegen

  2. Files to be kept completely intact if there is no JSX in them.

Thanks for all your hard work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions