1
0
forked from notnull/waveform

updated Webpack config

- removed hotloading 
- removed output public path
- added historyApiFallback (so that 404s return index.html)
This commit is contained in:
notnull 2019-03-23 17:21:22 -04:00
parent 95c473bda1
commit 829f4530ba

View File

@ -1,4 +1,5 @@
const webpack = require('webpack') const webpack = require('webpack')
const path = require('path')
module.exports = { module.exports = {
entry: ['@babel/polyfill', './src/index.js'], entry: ['@babel/polyfill', './src/index.js'],
@ -15,15 +16,15 @@ module.exports = {
extensions: ['*', '.js', '.jsx'], extensions: ['*', '.js', '.jsx'],
}, },
output: { output: {
path: __dirname + '/dist', path: __dirname + '/dist',
publicPath: '/',
filename: 'bundle.js', filename: 'bundle.js',
}, },
plugins: [new webpack.HotModuleReplacementPlugin()], plugins: [new webpack.HotModuleReplacementPlugin()],
devServer: { devServer: {
contentBase: './dist', contentBase: path.join(__dirname, 'dist'),
hot: true, hot: false,
port: 3001, port: 3001,
historyApiFallback: true,
allowedHosts: [ allowedHosts: [
'localhost', 'localhost',
'irc.anarchyplanet.org', 'irc.anarchyplanet.org',