In react-native 0.14, we can require
an image using const fireImage = require('./images/demo.jpg')
. The require
works fine with images(png, jpeg, gif), 'js' and 'json' files.
My question is: Is it possible to 'require' a '.mp3' or '.mp4' files?
I have tried the 'mp3' file and the Xcode reported a build error like this
uncaught error Error: UnableToResolveError: Unable to resolve module ./music/some from /Users/rongshen/tmp/react-native-test/imageTest/index.ios.js: Invalid directory /Users/rongshen/tmp/react-native-test/imageTest/music/some.mp3