babel-plugin-transform-react-remove-prop-types
Version:
Remove unnecessary React propTypes from the production build
14 lines (12 loc) • 340 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isAnnotatedForRemoval;
function isAnnotatedForRemoval(node) {
var comments = node.trailingComments || [];
return Boolean(comments.find(function (_ref) {
var value = _ref.value;
return value.trim() === 'remove-proptypes';
}));
}