text: const NpmInstallPlugin = require("npm-install-webpack-plugin");
  const detect = require("detect-port");
  const webpack = require("webpack");
  const commonPaths = require("./common-paths");
  
  const config = {
    devtool: "eval-source-map",
    devServer: {
      port: 3002,
      open: true,
      host: "0.0.0.0",
      overlay: true,
      hot: true,
      useLocalIp: true,
      historyApiFallback: true
    },
    module: {
      rules: [
        {
          test: /\.css$/,
          exclude: /node_modules /,
          use: [
            {
              loader: "style-loader"
            },
            {
              loader: "css-loader",
              options: {
                importLoaders: 1
              }
            },
            {
              loader: "postcss-loader"
            }
          ]
        },
        {
          test: /\.jsx?$/,
          exclude: /node_modules /,
          enforce: "pre",
          loader: "eslint-loader",
          options: {
            emitWarning: true
          }
        },
        {
          test: /.jsx?$/,
          use: {
            loader: "babel-loader"
          },
          exclude: /(node_modules|dist|build-utils|webpack.config.js)/
        }
      ]
    },
    plugins: [
      new NpmInstallPlugin(), 
      new webpack.HotModuleReplacementPlugin(), 
      new webpack.NamedModulesPlugin
    ]
  };
  
  module.exports = config;
  