gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.64k stars 343 forks source link

rewrite the library with TypeScript #480

Open gre opened 1 year ago

ywisax commented 1 month ago
ERROR in ../../node_modules/react-native-view-shot/src/index.js 5:12
Module parse failed: Unexpected token (5:12)
File was processed with these loaders:
 * ../../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| import { View, Platform, findNodeHandle, StyleProp } from "react-native";
| import RNViewShot from "./RNViewShot";
> import type { ViewStyleProp } from "react-native/Libraries/StyleSheet/StyleSheet";
| import type { LayoutEvent } from "react-native/Libraries/Types/CoreEventTypes";
| 

webpack compiled with 2 errors (a8ff325113df7cdd)
No errors found.

I using this lib with react-native-web, and some error throw due to the flow syntax. I think it is related to this issue.