Skip to content
Snippets Groups Projects
webpack.config.js 778 B
Newer Older
  • Learn to ignore specific revisions
  • /* eslint-disable */
    
    const HtmlWebpackPlugin = require('html-webpack-plugin')
    
    
    module.exports = {
      entry: './src/index.js',
      output: {
        path: __dirname + '/build/',
        filename: 'bundle.[hash].js'
      },
    
      mode: 'production',
    
      module: {
        rules: [
          {
            test: /\.(js|jsx)$/,
            exclude: /node_modules/,
            use: {
    
            }
          },
          {
            test: /\.(css)$/,
    
          },
          {
            test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
            loader: 'url-loader',
            options: {
              limit: 10000
            }
          }
        ]
      },
    
      plugins: [
        new HtmlWebpackPlugin({
          inject: 'body',
          filename: './index.html',
          template: './index.html'
        })
      ]