{"size": 779, "ext": "js", "max_stars_repo_path": "webpack.dev.js", "max_stars_repo_name": "Abyssness/react-web-demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "webpack.dev.js", "max_issues_repo_name": "Abyssness/react-web-demo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.dev.js", "max_forks_repo_name": "Abyssness/react-web-demo", "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": 28.8518518519, "max_line_length": 65, "alphanum_fraction": 0.5455712452}
const { join, resolve } = require('path');
const HtmlWebpackPligin = require('html-webpack-plugin');

module.exports = {
    mode: 'development',
    output: {
        assetModuleFilename: 'images/[name].bundle.[ext]',
        filename: 'scripts/[name].bundle.js'
    },
    devServer: {
        historyApiFallback: true,
        contentBase: join(__dirname, './dist'),
        port: 3000,
        // 配合 friendly-error-webpack-plugin
        // 通知窗口 node-notifler
        // quiet: true,
        watchContentBase: true
    },
    devtool: 'source-map',
    plugins: [
        new HtmlWebpackPligin({
            title: 'VIP 网站 DEV版',
            filename: 'index.html',
            template: resolve(__dirname, './src/index.dev.html')
        })
    ]
}