From 829f4530baf0b627b11db867af63cd10219f4a77 Mon Sep 17 00:00:00 2001 From: notnull Date: Sat, 23 Mar 2019 17:21:22 -0400 Subject: [PATCH] updated Webpack config - removed hotloading - removed output public path - added historyApiFallback (so that 404s return index.html) --- webpack.config.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 682a087..b180341 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ const webpack = require('webpack') +const path = require('path') module.exports = { entry: ['@babel/polyfill', './src/index.js'], @@ -15,15 +16,15 @@ module.exports = { extensions: ['*', '.js', '.jsx'], }, output: { - path: __dirname + '/dist', - publicPath: '/', + path: __dirname + '/dist', filename: 'bundle.js', }, plugins: [new webpack.HotModuleReplacementPlugin()], devServer: { - contentBase: './dist', - hot: true, + contentBase: path.join(__dirname, 'dist'), + hot: false, port: 3001, + historyApiFallback: true, allowedHosts: [ 'localhost', 'irc.anarchyplanet.org',