const path = require('path');
const merge = require('webpack-merge');
const common = require('./webpack.common.config.js');

const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = merge(common, {
  mode: 'development',
  output: {
    filename: 'nodejs/[name].[hash:8].bundle.js',
  },
  devServer: {
    contentBase: path.resolve(__dirname, '../dist'),
    open: true,
    port: 9090,
    compress: true,
    hot: true
  },
  // plugins: [
  //   new HtmlWebpackPlugin({
  //     template: 'public/index.html',
  //     inject: 'body',
  //     hash: false
  //   })
  //   //,new webpack.HotModuleReplacementPlugin()
  // ]
});
