score:3

Please see this post for details (ERROR in multi) Module not found: Error: Can't resolve 'babel/loader' and execute this command:

npm install -D babel-loader @babel/core @babel/preset-env webpack

Source: https://github.com/babel/babel-loader

score:6

It looks like module.loaders section of your webpack config is for older versions of webpack while you are using the latest (3.10.0). This is how it should look with the latest webpack for your configuration:

module: {
  rules: [
    { 
      test: /\.js$/,
      include: [
        path.resolve(__dirname, "src")
      ],
      use: {
        loader: 'babel-loader'
      },
      options: {
        presets: ['react', 'es2015', 'env']
      }
    },
    {
       test: /\.css$/,
       use: {
         loader: 'style-loader!css-loader'
       }     
    }
  ]

All webpack options are described in the docs in the configuration section here.


Related Query

More Query from same tag