Newer
Older
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const webpack = require('webpack');
const outputDirectory = 'dist/public';
module.exports = {
entry: {
app: './src/client/index.js',
},
plugins: [
new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
title: 'Mapping Manuscript Migrations – A Digging into Data project for 2017-2019',
// Load a custom template
template: 'src/client/index.html',
}),
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, outputDirectory),