Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pressable props export #3036

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

j-piasecki
Copy link
Member

Description

The current output for commonjs is

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "PressableProps", {
  enumerable: true,
  get: function () {
    return _PressableProps.PressableProps;
  }
});
Object.defineProperty(exports, "default", {
  enumerable: true,
  get: function () {
    return _Pressable.default;
  }
});

var _PressableProps = require("./PressableProps");

var _Pressable = _interopRequireDefault(require("./Pressable"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

While PressableProps doesn't exist as it only exports types. This may be causing problems (like in Expensify atm).

This PR changes it to only export types, which are stripped resulting in

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "default", {
  enumerable: true,
  get: function () {
    return _Pressable.default;
  }
});

var _Pressable = _interopRequireDefault(require("./Pressable"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

Test plan

Build the library and check generated files

Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@j-piasecki j-piasecki merged commit acf996d into main Aug 7, 2024
1 check passed
@j-piasecki j-piasecki deleted the @jpiasecki/fix-pressable-type-export branch August 7, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants