text: const path = require('path');
  
  let FaviconsWebpackPlugin = require('favicons-webpack-plugin');
  var HtmlWebpackPlugin = require('html-webpack-plugin');
  const Dotenv = require('dotenv-webpack');
  
  module.exports = {
    entry: './src/index.js',
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: 'bundle.js',
      publicPath: '/',
    },
    resolve: {
      extensions: ['.js', '.jsx', '.css'],
    },
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.jsx$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.css$/,
          use: [
            {
              loader: 'style-loader',
            },
            {
              loader: 'css-loader',
              options: {
                modules: true,
                importLoaders: 1,
                localIdentName: '[name]_[local]_[hash:base64]',
                sourceMap: true,
                minimize: true,
              },
            },
          ],
        },
        {
          test: /\.(png|jpg|ttf|gif|svg|woff|eot)$/,
          use: [
            { loader: 'url-loader', options: { limit: 8192 } },
            // limit => file.size =< 8192 bytes ? DataURI : File
          ],
        },
      ],
    },
    devServer: {
      disableHostCheck: true,
      historyApiFallback: {
        index: '/',
      },
      headers: {
        'Access-Control-Allow-Origin': '*',
        'Access-Control-Allow-Headers':
          'Origin, X-Requested-With, Content-Type, Accept',
      },
    },
    plugins: [
      new FaviconsWebpackPlugin({
        // Your source logo
        logo: './admincore.png',
        // The prefix for all image files (might be a folder or a name)
        prefix: 'icons-[hash]/',
        // Emit all stats of the generated icons
        emitStats: false,
        // The name of the json containing all favicon information
        statsFilename: 'iconstats-[hash].json',
        // Generate a cache file with control hashes and
        // don't rebuild the favicons until those hashes change
        persistentCache: true,
        // Inject the html into the html-webpack-plugin
        inject: true,
        // favicon background color (see https://github.com/haydenbleasel/favicons#usage)
        background: '#fff',
        // favicon app title (see https://github.com/haydenbleasel/favicons#usage)
        title: 'Admin Core',
  
        // which icons should be generated (see https://github.com/haydenbleasel/favicons#usage)
        icons: {
          android: true,
          appleIcon: true,
          appleStartup: true,
          coast: false,
          favicons: true,
          firefox: false,
          opengraph: false,
          twitter: false,
          yandex: false,
          windows: true,
        },
      }),
      new HtmlWebpackPlugin({
        template: './src/index.template.ejs',
        inject: 'body',
      }),
      new Dotenv(),
    ],
  };
  