{"size": 847, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "SamerShahin/optimizing-web-apps-webpack", "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": "SamerShahin/optimizing-web-apps-webpack", "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": "SamerShahin/optimizing-web-apps-webpack", "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": 25.6666666667, "max_line_length": 59, "alphanum_fraction": 0.6162927981}
const path = require('path');
const webpack = require('webpack');
const babelLoader = require('./babelLoader');
const merge = require('webpack-merge');
const CleanWebpackPlugin = require('clean-webpack-plugin');

const baseConfig = {
    mode: "development",
    entry: './app/app.js',
    output: {
        path: path.resolve(__dirname, 'app/dist'),
        filename: "app.bundle.js",
        publicPath: "/dist/"
    },
    devServer: {
        contentBase: path.resolve(__dirname, 'app'),
        publicPath: '/dist/',
        watchContentBase: false,
        hotOnly: true,
        overlay: true
    },
    plugins: [
        new CleanWebpackPlugin(['app/dist']),
        new webpack.NamedModulesPlugin(),
        new webpack.HotModuleReplacementPlugin()
    ]
};


module.exports = function () {
    return merge(baseConfig, babelLoader);
};
