{"size": 1428, "ext": "js", "max_stars_repo_path": "webpack/config/dev.js", "max_stars_repo_name": "xio4/unibot-manager", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "webpack/config/dev.js", "max_issues_repo_name": "xio4/unibot-manager", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack/config/dev.js", "max_forks_repo_name": "xio4/unibot-manager", "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": 26.4444444444, "max_line_length": 73, "alphanum_fraction": 0.5791316527}
const webpackMerge = require('webpack-merge');
const commonConfig = require('./common');
const path = require('path');
const env = require('./env');

const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ProgressPlugin = require('progress-bar-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const outputPath = path.resolve(commonConfig.context, 'build', 'assets');
const publicPath = `http://${env.host}:${env.port}/assets/`;

const devConfig = {
    entry: {
        vendor: ['bootstrap-loader']
    },
    output: {
        path: outputPath,
        publicPath,
        filename: '[name].js',
        chunkFilename: '[name].js',
        jsonpFunction: 'jpf'
    },
    cache: true,
    debug: true,
    devtool: 'source-map',
    modules: {
        preLoaders: [
            {
                test: /\.js$/,
                loader: 'source-map-loader'
            }
        ]
    },
    plugins: [
        new ExtractTextPlugin({
            filename: '[name].css',
            allChunks: true
        }),
        new HtmlWebpackPlugin({
            filename: path.join(outputPath, 'index.html'),
            title: commonConfig.headTitle,
            template: '!!ejs!templates/index.tpl'
        }),
        new ProgressPlugin(),
        new webpack.NoErrorsPlugin()
    ]


};

module.exports = webpackMerge.smart(commonConfig, devConfig);
