Open
Description
Hi, I am facing issue in loading an image.
Error is :
ERROR in ./~/react-native-web-image/index.js
Module parse failed: /Users/MyName/Documents/Learning/Test3/node_modules/react-native-web-image/index.js Unexpected token (12:19)
You may need an appropriate loader to handle this file type.
|
| class WebImage extends React.Component {
| static propTypes = {
| ...View.propTypes,
| source: SourcePropType.isRequired,
@ ./index.web.js 9:25-58
@ multi (webpack)-dev-server/client?http://localhost:8080 ./index.web.js
webpack: Failed to compile.
Webconfig file:
const webpack = require('webpack');
module.exports = {
entry: {
main: './index.web.js',
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react'],
},
},
],
},
resolve: {
alias: {
'react-native': 'react-native-web',
},
},
};