Skip to content

Corrupt build for web in v0.18.1 #80

Description

@dhalenok

v0.18.1 contains a corrupt lib/module/AnimateableText.web.js. The sourcemap comment at the end of the file is concatenated with a chunk of code:

import * as React from 'react';
import { Text } from 'react-native';
export const AnimateableText = /*#__PURE__*/React.forwardRef((props, ref) => {
  const [text, setText] = React.useState(props.text);
  const animatedTextRef = React.useRef(null);
  // just in case users tried to update the value without
  // a shared value
  React.useEffect(() => {
    if (props.text) {
      setText(props.text);
    }
  }, [props.text]);
  React.useImperativeHandle(ref, () => ({
    setNativeProps: nativeProps => {
      if (animatedTextRef.current && nativeProps.text) {
        setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
      }
    }
  }), []);
  return /*#__PURE__*/React.createElement(Text, {
    ref: animatedTextRef,
    ...props
  }, text);
});
//# sourceMappingURL=AnimateableText.web.js.maptext) {
        setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
      }
    }
  }), []);
  return /*#__PURE__*/React.createElement(Text, _extends({
    ref: animatedTextRef
  }, props), text);
});
//# sourceMappingURL=AnimateableText.web.js.map

Metro error: SyntaxError: /node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js: Unexpected token (27:6)

  25 | //# sourceMappingURL=AnimateableText.web.js.maptext) {
  26 |         setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
> 27 |       }
     |       ^
  28 |     }
  29 |   }), []);
  30 |   return /*#__PURE__*/React.createElement(Text, _extends({

Call Stack
(node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js:27:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions