diff --git a/example/App.js b/example/App.js index 5579f7f..a2c6ee1 100644 --- a/example/App.js +++ b/example/App.js @@ -9,8 +9,8 @@ import { Platform, } from 'react-native'; -import ImageView from './ImageView'; -// import ImageView from 'react-native-image-view'; +// import ImageView from '../src/ImageView'; +import ImageView from 'react-native-image-view'; const {width} = Dimensions.get('window'); diff --git a/example/app.json b/example/app.json index 2ac19c9..089527e 100644 --- a/example/app.json +++ b/example/app.json @@ -16,6 +16,10 @@ }, "ios": { "supportsTablet": true + }, + "packagerOpts": { + "projectRoots": "", + "config": "rn-cli.config.js" } } } diff --git a/example/package.json b/example/package.json index f64e81c..3d8c6e5 100644 --- a/example/package.json +++ b/example/package.json @@ -5,7 +5,7 @@ "expo": "^25.0.0", "react": "16.0.0", "react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz", - "react-native-image-view": "2.0.12" + "react-native-image-view": "2.1.0" }, "devDependencies": { "babel-eslint": "8.2.3", diff --git a/example/rn-cli.config.js b/example/rn-cli.config.js new file mode 100644 index 0000000..bd7adfa --- /dev/null +++ b/example/rn-cli.config.js @@ -0,0 +1,16 @@ +const path = require('path'); + +const config = { + extraNodeModules: { + 'react-native': path.resolve(__dirname, 'node_modules/react-native'), + react: path.resolve(__dirname, 'node_modules/react'), + }, + getProjectRoots() { + return [ + // Keep your project directory. + path.resolve(__dirname), + path.resolve(__dirname, '..'), // path to the external module + ]; + }, +}; +module.exports = config;