{"size": 1159, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "pedromdev/appointments-system", "max_stars_repo_stars_event_min_datetime": "2019-04-22T13:31:35.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-22T13:31:35.000Z", "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "pedromdev/appointments-system", "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": "pedromdev/appointments-system", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.6935483871, "max_line_length": 57, "alphanum_fraction": 0.4564279551}
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const VENDOR_LIBS = [
  '@sentry/browser',
  'apollo-client',
  'axios',
  'graphql-tag',
  'react',
  'react-apollo',
  'react-dom',
  'react-redux',
  'react-router',
  'redux',
];

module.exports = {
  entry: {
    bundle: './src/client/index.js',
    vendor: VENDOR_LIBS,
  },
  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js'
  },
  module: {
    rules: [
      {
        use: {
          loader: 'babel-loader',
          options: {
            presets: [
              "@babel/preset-env",
              "@babel/preset-react"
            ]
          }
        },
        test: /\.js$/,
        exclude: /node_modules/
      },
      {
        use: [ 'style-loader', 'css-loader' ],
        test: /\.css$/
      },
      {
        test: /\.(jpe?g|png|gif|svg)$/,
        use: [
          {
            loader: 'url-loader',
            options: { limit: 40000 }
          },
          'image-webpack-loader'
        ]
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './src/client/index.html'
    }),
  ]
};