redux-devtools/packages/d3-state-visualizer/examples/tree/webpack.config.js

32 lines
697 B
JavaScript
Raw Normal View History

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,
},
],
},
};