<commit_before>// Webpack
import webpack from 'webpack';

// Path
import path from 'path';

// // HTML Webpack plugin
// import HtmlWebpackPlugin from 'html-webpack-plugin';
//
// // Copy Webpack plugin
// import CopyWebpackPlugin from 'copy-webpack-plugin';

export default {
  entry: "./es6/main.js",//入口文件
  output: {//打包输出的文件
    path: __dirname,
    filename: "bundle.js"
  },
  module: {
    loaders: [
      {
				test: /\.handlebars$/,
				loader: 'handlebars-loader',
      },
      {
        //test: path.join(__dirname, 'es6'),
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        query: {
          presets: ['es2015']
        }
      }
    ]
  },
  resolve: {// 现在你require文件的时候可以直接使用require('file')，不用使用require('file.coffee')
    extensions: ['', '.js', '.json']
  },
  node: {
    fs: 'empty'
  }
};<commit_msg>更新配置信息，测试兼容性<commit_after>// Webpack
import webpack from 'webpack';

// Path
import path from 'path';

// HTML Webpack plugin
import HtmlWebpackPlugin from 'html-webpack-plugin';

// // Copy Webpack plugin
// import CopyWebpackPlugin from 'copy-webpack-plugin';

export default {
    entry: "./es6/main.js", //入口文件
    output: { //打包输出的文件
        // path: __dirname,
        // filename: "bundle.js"
        path: path.join(__dirname, 'dist'), //输出目录的配置，模板、样式、脚本、图片等资源的路径配置都相对于它
        //  publicPath: 'dist/', //模板、样式、脚本、图片等资源对应的server上的路径
        filename: 'js/[name].js', //每个页面对应的主js的生成配置
        chunkFilename: 'js/[id].chunk.js' // chunk生成的配置
    },
    module: {
        loaders: [{
            test: /\.handlebars$/,
            loader: 'handlebars-loader',
        }, {
            //test: path.join(__dirname, 'es6'),
            test: /\.js$/,
            exclude: /node_modules/,
            loader: 'babel-loader',
            query: {
                presets: ['es2015'],
                plugins: ['transform-runtime']
            }
        }]
    },
    resolve: { // 现在你require文件的时候可以直接使用require('file')，不用使用require('file.coffee')
        extensions: ['', '.js', '.json']
    },
    node: {
        fs: 'empty'
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: './index.html',
            filename: './index.html',
            chunks: ['main', 'vendor'],
            hash: true,
            minify: { //压缩HTML文件
                removeComments: true, //移除HTML中的注释
                collapseWhitespace: false //删除空白符与换行符
            }
        }),
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery"
        }),
        new webpack.HotModuleReplacementPlugin(), //开启热替换插件
        new webpack.NoErrorsPlugin(),
    //    new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js'), //这是妮第三方库打包生成的文件
        new webpack.optimize.UglifyJsPlugin({
            sourceMap: false,
            mangle: false,
            compress: {
                warnings: false
            }
        })
    ]
};
{'fraction_non_alphanumeric': 0.15692934782608695, 'fraction_numerical': 0.004076086956521739, 'mean_word_length': 1.799429657794677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5075247', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1035, 'n_words': 181}