Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2283

`@realm/babel-plugin` Add support for printing generated source-code

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Realm Babel

      When using the babel plugin, it could be beneficial to see the schema in the Metro terminal.

      We could add support for this by reading a DEBUG_REALM_SCHEMAS env variable:

        if (process.env.DEBUG_REALM_SCHEMAS) {
          console.log(generate(schemaStatic).code);
        }
      

      Somewhere around here:

      https://github.com/realm/realm-js/blob/fa519267504f0a4f898073349f0b2e7aa68452e1/packages/babel-plugin/src/plugin/index.ts#L400-L401

            Assignee:
            Unassigned Unassigned
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: