- removed hotloading - removed output public path - added historyApiFallback (so that 404s return index.html)
39 lines
805 B
JavaScript
39 lines
805 B
JavaScript
const webpack = require('webpack')
|
|
const path = require('path')
|
|
|
|
module.exports = {
|
|
entry: ['@babel/polyfill', './src/index.js'],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|jsx)$/,
|
|
exclude: /node_modules/,
|
|
use: ['babel-loader'],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['*', '.js', '.jsx'],
|
|
},
|
|
output: {
|
|
path: __dirname + '/dist',
|
|
filename: 'bundle.js',
|
|
},
|
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
|
devServer: {
|
|
contentBase: path.join(__dirname, 'dist'),
|
|
hot: false,
|
|
port: 3001,
|
|
historyApiFallback: true,
|
|
allowedHosts: [
|
|
'localhost',
|
|
'irc.anarchyplanet.org',
|
|
'services.anarchyplanet.org',
|
|
'gam4soeb3t5f56fs.onion',
|
|
],
|
|
proxy: {
|
|
'/api': 'http://localhost:31337',
|
|
},
|
|
},
|
|
}
|