waveform/webpack.config.js
notnull 829f4530ba updated Webpack config
- removed hotloading 
- removed output public path
- added historyApiFallback (so that 404s return index.html)
2019-03-23 17:21:22 -04:00

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',
},
},
}