text: const path = require('path')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  const Stylish = require('webpack-stylish')
  
  module.exports = {
    entry: {
      main: [
        'babel-polyfill',
        path.resolve(__dirname, '../src/index.js')
      ]
    },
    output: {
      path: path.resolve(__dirname, '../dist'),
      filename: '[name].js',
      chunkFilename: 'chunk/[name].[chunkhash].js'
    },
    module: {
      rules: [
        {
          enforce: 'pre',
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          loader: 'standard-loader',
          options: {
            error: false,
            snazzy: true,
            parser: 'babel-eslint'
          }
        },
        {
          test: /\.(js|jsx)$/,
          loader: 'babel-loader?cacheDirectory',
          exclude: /(node_modules\/(?!hiui)|forcegraph)/,
          query: {compact: false}
        },
        {
          test: /\.(png|jpe?g|gif|svg)$/,
          loader: 'url-loader',
          options: {
            limit: 10000,
            name: '[name].[ext]?[hash]'
          }
        },
        {
          test: /\.(eot|ttf|woff|woff2|otf)/,
          loader: 'file-loader',
          options: {
            name: './static/fonts/[name].[ext]?[hash]'
          }
        },
        {
          test: /(fontawesome-webfont)\.(svg)$/,
          loader: 'file-loader',
          options: {
            name: './static/fonts/[name].[ext]?[hash]'
          }
        }
      ]
    },
    resolve: {
      modules: ['node_modules'],
      extensions: ['.web.js', '.js', '.jsx', '.json']
    },
    mode: '',
    plugins: [
      new HtmlWebpackPlugin({
        title: 'Istio',
        template: path.resolve(__dirname, '../src/index.html'),
        // minify: true,
        // inject: true,
        cache: true,
        domain: process.env.HOST_ENV
      }),
      new Stylish()
    ]
  }
  