{"size": 1563, "ext": "js", "max_stars_repo_path": "config/webpack.common.js", "max_stars_repo_name": "wangyinwei1/Whitelabel-Error-Page", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "config/webpack.common.js", "max_issues_repo_name": "wangyinwei1/Whitelabel-Error-Page", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "config/webpack.common.js", "max_forks_repo_name": "wangyinwei1/Whitelabel-Error-Page", "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": 24.0461538462, "max_line_length": 65, "alphanum_fraction": 0.4542546385}
const webpack = require('webpack');
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const PATHS = require('./PATHS');

module.exports = {
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
        },
      },
      {
        test: /\.json$/,
        use: [
          {
            loader: 'json-loader',
          },
        ],
      },
      {
        test: /\.(png|gif|jpg)$/,
        use: [
          {
            loader: 'url-loader',
            options: {
              limit: 10240,
              name: path.normalize('assets/[name].[ext]'),
            },
          },
        ],
      },
      {
        test: /\.(woff|woff2|ttf|eot|svg)$/,
        use: [
          {
            loader: 'url-loader',
            options: {
              limit: 10240,
              name: path.normalize('assets/[name].[ext]'),
            },
          },
        ],
      },
    ],
  },
  resolve: {
    extensions: ['.js', '.jsx'],
    alias: {
      stylesheet: path.resolve(PATHS.src, 'asset/stylesheet'),
      image: path.resolve(PATHS.src, 'asset/image'),
      layout: path.resolve(PATHS.src, 'layout'),
      component: path.resolve(PATHS.src, 'component'),
      page: path.resolve(PATHS.src, 'page'),
      util: path.resolve(PATHS.src, 'util'),
      constant: path.resolve(PATHS.src, 'constant'),
      store: path.resolve(PATHS.src, 'store'),
    },
  },
  plugins: [new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)],
};
