I'm following some video tutorial on react and now I'm stuck with this "module build failed error". The screenshots are provided below, Some invalid index.js having invalid property of 'name'.
Please check them and help me out, webpack is showing error though in video tutorial they had no errors!
module.exports = {
entry: './public/app.jsx',
output: {
path: __dirname,
filename: './public/bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
},
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/
}
]
}
};
{
"name": "hello-react",
"version": "1.0.0",
"description": "simple app\u001b[D\u001b[D\u001b[Dreact app",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Shubham",
"license": "MIT",
"dependencies": {
"express": "^4.15.4",
"react": "^0.14.7",
"react-dom": "^0.14.7"
},
"devDependencies": {
"babel-core": "^6.5.1",
"babel-loader": "^6.2.2",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"webpack": "^1.12.13"
}
}