{"size": 1314, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "sangupta/react-twist-base", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "sangupta/react-twist-base", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.config.js", "max_forks_repo_name": "sangupta/react-twist-base", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.1935483871, "max_line_length": 101, "alphanum_fraction": 0.5890410959}
const webpack = require('webpack');
const path = require('path');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const ReactTwistPlugin = require('@twist/react-webpack-plugin');

const isProduction = process.env.NODE_ENV === 'production';

module.exports = {
  context: __dirname,

  entry: {
    app: [ './src/App.jsx', 'react-hot-loader/patch' ],
    vendor: [ "react", "react-dom" ]
  },

  devServer: {
    contentBase: path.join(__dirname, 'assets'),
    compress: true,
    port: 1309,
    hot: true,
    https: false,
    noInfo: false,
    historyApiFallback: true
  },

  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,
        loader: ['babel-loader']
      }
    ]
  },

  resolve: {
    extensions: ['*', '.js', '.jsx'],
    alias: {
      src: './src'
    }
  },

  output: {
    path: __dirname + '/dist',
    publicPath: '/',
    filename: '[name].js'
  },

  devtool: isProduction ? 'source-map' : 'cheap-module-eval-source-map',

  plugins: [
    new webpack.DefinePlugin({
            'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
    }),
    new ReactTwistPlugin(),
    new webpack.HotModuleReplacementPlugin(),
    new HtmlWebpackPlugin({ title: 'React Twist Base', template: 'src/index.ejs', inject : 'body'  })
  ]

};
