text: const HtmlWebpackPlugin = require('html-webpack-plugin')
  
  module.exports = {
    context: __dirname + '/src',
  
    entry: {
      javascript: './app.js',
    },
  
    output: {
      path: __dirname + '/dist',
      filename: 'bundle.js',
    },
  
    devServer: {
      contentBase: 'dist',
      port: 3000,
      hot: true,
    },
  
    resolve: {
      alias: {
        vue: 'vue/dist/vue.js',
      },
    },
  
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
        },
        {
          test: /\.pug$/,
          exclude: /node_modules/,
          loader: 'pug-loader',
        },
        {
          test: /\.jpg$/,
          exclude: /node_modules/,
          loader: 'file-loader',
        },
        {
          test: /\.css$/,
          exclude: /node_modules/,
          use: [
            {
              loader: 'style-loader',
            },
            {
              loader: 'css-loader',
              options: {
                importLoaders: 1,
              },
            },
            {
              loader: 'postcss-loader',
            },
          ],
        },
      ],
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: './index.pug',
        filename: 'index.html',
        inject: true,
      }),
    ],
  }
  