<commit_before>import glob from 'glob'
import path from 'path'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import Visualizer from 'webpack-visualizer-plugin'
import webpack from 'webpack'
import qiniuPlugin from './qiniu.js'
export default function ({mode = 'development', port, nodePort} = {}) {
  const viewRoot = './client/views/'
  const staticRoot = './static'
  const files = glob.sync(viewRoot + '*/main.js')
  const entry = {}
  files.forEach(filename => {
    const name = path.posix.relative(viewRoot, filename).replace(/\/main\.js/, '')
    entry[name] = filename
  })
  console.log(entry)
  console.log('\x1b[35m%s\x1b[0m', '[' + new Date().toLocaleString() + ']', '--webpack start')
  const cssLoader = ExtractTextPlugin.extract({
    fallback: 'style-loader',
    use: ['css-loader', 'postcss-loader']
  })
  return {
    entry,
    output: {
      filename: 'js/[name].js',
      path: path.resolve(staticRoot),
      publicPath: mode === 'development' ? '/static/' : 'http://cdn.toxicjohann.com/ispwaready/',
      chunkFilename: '[name]-[hash].js'
    },
    module: {<commit_msg>to pass travis<commit_after>import glob from 'glob'
import path from 'path'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import Visualizer from 'webpack-visualizer-plugin'
import webpack from 'webpack'
export default function ({mode = 'development', port, nodePort} = {}) {
  const qiniuPlugin = mode === 'development' ? {} : require('./qiniu.js')
  const viewRoot = './client/views/'
  const staticRoot = './static'
  const files = glob.sync(viewRoot + '*/main.js')
  const entry = {}
  files.forEach(filename => {
    const name = path.posix.relative(viewRoot, filename).replace(/\/main\.js/, '')
    entry[name] = filename
  })
  console.log(entry)
  console.log('\x1b[35m%s\x1b[0m', '[' + new Date().toLocaleString() + ']', '--webpack start')
  const cssLoader = ExtractTextPlugin.extract({
    fallback: 'style-loader',
    use: ['css-loader', 'postcss-loader']
  })
  return {
    entry,
    output: {
      filename: 'js/[name].js',
      path: path.resolve(staticRoot),
      publicPath: mode === 'development' ? '/static/' : 'http://cdn.toxicjohann.com/ispwaready/',
      chunkFilename: '[name]-[hash].js'
    },
    module: {
{'fraction_non_alphanumeric': 0.17667844522968199, 'fraction_numerical': 0.00441696113074205, 'mean_word_length': 3.68944099378882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6852672', 'n_tokens_mistral': 749, 'n_tokens_neox': 729, 'n_words': 161}