-
Notifications
You must be signed in to change notification settings - Fork 84
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
image! require error #6
Comments
Let me know if this works for you: https://github.com/willpiers/react-native-image-loader |
There doesn't appear to be documentation there, but I imagine you would have to rewrite the require statement in your code to something like: require('my_image.png'); And in your webpack config: modules: {
loaders: [
{test: /\.png$/, loaders: ['react-native-image']}
]
} The loader would transform your code to: require('image!my_image'); |
@boyswan, your issue sounds familiar. If @mjohnston's suggestion isn't what you need, would you mind giving my changes in #7 a spin? |
@mjohnston thanks, has no compile errors however doesn't display the image. @colinhicks #7 works perfectly! Thanks |
@mjohnston I am currently looking for a react native like webpack loader for image since I use react-native-web but your previous link https://github.com/willpiers/react-native-image-loader is a 404 for me. Any idea where I can find this thing? |
Firstly thank you for this, it's great!
The only problem I've had is requiring images via Image.xcassets. Is there currently a way to handle this?
The text was updated successfully, but these errors were encountered: