redux-devtools/packages/d3-state-visualizer/examples/tree/webpack.config.js
2020-08-09 01:06:18 -04:00

37 lines
778 B
JavaScript

var path = require('path');
var webpack = require('webpack');
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: 'eval-source-map',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/',
},
plugins: [new webpack.HotModuleReplacementPlugin()],
resolve: {
extensions: ['.js'],
},
module: {
rules: [
{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/,
include: __dirname,
},
],
},
devServer: {
historyApiFallback: true,
hot: true,
port: 3000,
},
};