0

I have a issue , i wasted so much time on googling i need to ask here this error

 var config = {
   entry: './main.js',

   output: {
      path: require('path').resolve("./ReactApp/js"),
      filename: 'bundle.js',
      publicPath: 'http://127.0.0.1:2992/js'
   },

   devServer: {
      inline: true,
      port: 8080
   },

   module: {
      loaders: [
         {
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel-loader',

            query: {
               presets: ['es2015', 'react']
            }
         }

      ]
   }

}

module.exports = config;

i don't know where is the issue , i just want learn React.js and this is preventing me to do it , can you please explain to me where is the mistake? Thanks in advance

1 Answers1

0

As it was pointed out most probable you have not installed babel-loader module, so you need to do it via npm install command. Also, I would recommend to choose some react application generator which will setup the development environment for you to start learning React and not spend time fixing Webpack and other issue. The most simple one from my point of view is create-react-app.

Serg
  • 86
  • 4