{"size": 2091, "ext": "js", "max_stars_repo_path": "webpack.dev.config.js", "max_stars_repo_name": "stephenzhao/universal-react-redux-koa-app", "max_stars_repo_stars_event_min_datetime": "2016-05-05T03:31:06.000Z", "max_stars_repo_stars_event_max_datetime": "2016-05-23T07:46:12.000Z", "max_issues_repo_path": "webpack.dev.config.js", "max_issues_repo_name": "stephenzhao/universal-react-redux-koa-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.dev.config.js", "max_forks_repo_name": "stephenzhao/universal-react-redux-koa-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.6438356164, "max_line_length": 98, "alphanum_fraction": 0.4141559063}
var webpack = require('webpack');
var postcssImport = require('postcss-import');
var postcssUrl = require('postcss-url');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var config = require('./config.json');
var path = require('path');

module.exports = {
    entry: {
        app: './src/app/index.js',
        lib: [
            'history',
            'react',
            'react-dom',
            'react-redux',
            'react-router',
            'redux',
            'redux-thunk'
        ]
    },
    devtool: 'source-map',
    resolve: {
        extensions: ['', '.js', '.jsx', '.scss', '.css']
    },
    output: {
        path: config.dest,
        filename: '[name].js'
    },
    module: {
        loaders: [
            {
                test: /\.js$/,
                loaders: ['babel-loader'],
                exclude: /node_modules/,
                include: [path.resolve(__dirname, 'src')]
            },
            {
                test: /\.jsx$/,
                loaders: ['babel-loader'],
                exclude: /node_modules/,
                include: [path.resolve(__dirname, 'src')]
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract('style-loader', 'css-loader', 'postcss-loader')
            },
            {
                test: /\.(eot|ttf|woff|woff2)/,
                loader: 'file-loader?name=./[name]-[hash].[ext]'
            },
            {
                test: /\.json$/,
                loader: 'json-loader'
            },
            {
                test: /\.(png|jpg|gif)$/,
                loader: 'url-loader?limit=10000&name=[name]-[hash].[ext]'
            }
        ]
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin('lib', 'lib.js'),
        new ExtractTextPlugin("index.css")
    ],
    postcss: function (webpack) {
        return [
            postcssImport({
                addDependencyTo: webpack
            }),
            postcssUrl()
        ];
    }
};