const path = require("path");
const webpack = require("webpack");

const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
  devtool: "cheap-module-source-map",

  entry: {
    app: [
      "webpack-dev-server/client?http://localhost:8080/",
      "webpack/hot/dev-server",
      path.resolve(__dirname, "./src/app.js"),
    ],
  },
  output: {
    path: path.resolve(__dirname, "./build"),
    pathinfo: true,
    filename: "app/js/[name].bundle.js",
    publicPath: "/",
  },
  resolve: {
    modules: [path.resolve(__dirname, "./src"), "node_modules",],
    extensions: [".js", ".json", "jsx",],
  },

  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        include: path.resolve(__dirname, "./src"),
        loader: "babel-loader",
        options: {
          cacheDirectory: true,
        },
      },
    ],
  },

  plugins: [
    new HtmlWebpackPlugin({
      inject: true,
      template: path.resolve(__dirname, "./index.html"),
    }),
    new webpack.HotModuleReplacementPlugin(),
  ]
};

@@ -541,26 +541,24 @@
 __dirname, %22
-./
 src%22), %22node
@@ -566,17 +566,16 @@
 modules%22
-,
 %5D,%0A    e
@@ -607,13 +607,13 @@
 %22, %22
+.
 jsx%22
-,
 %5D,%0A 

Fix resolve '.jsx' files