text: const path = require('path');
  const CopyWebpackPlugin = require('copy-webpack-plugin');
  
  module.exports = {
    entry: ['babel-polyfill', './src/index.js'],
    devtool: 'inline-source-map',
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: 'main.js',
    },
  
    module: {
      rules: [
        {
          test: /\.m?js$/,
          exclude: /(node_modules|bower_components)/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env'],
            },
          },
        },
      ],
    },
  
    plugins: [
      new CopyWebpackPlugin({
        patterns: [
          {
            from: path.resolve(__dirname, 'assets', '**', '*'),
            to: path.resolve(__dirname, 'dist'),
          },
        ],
      }),
    ],
  
    devServer: {
      contentBase: path.resolve(__dirname, 'dist'),
    },
  };
  