waveform/webpack.config.js
notnull a9a607efd1 added basename to router
- this enables the app to be hosted from a subdomain in production
2019-04-28 19:52:07 -04:00

41 lines
864 B
JavaScript

const webpack = require('webpack')
const path = require('path')
module.exports = {
entry: ['@babel/polyfill', './src/index.js'],
output: {
path: path.resolve(__dirname, '/dist'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
],
},
resolve: {
extensions: ['*', '.js', '.jsx'],
},
plugins: [new webpack.HotModuleReplacementPlugin()],
devServer: {
contentBase: path.join(__dirname, 'dist'),
hot: false,
port: 3001,
historyApiFallback: true,
allowedHosts: [
'localhost',
'127.0.0.1',
'irc.anarchyplanet.org',
'services.anarchyplanet.org',
'gam4soeb3t5f56fs.onion',
'opsqtua3b5dpg6zy.onion',
],
proxy: {
'/api': 'http://localhost:1337',
},
},
}