redux-devtools/packages/react-json-tree/examples/webpack.config.js
Nathan Bierema 0864f28156
fix(react-json-tree): fix react-json-tree examples (#531)
* Consolidate dependencies in react-json-tree examples

* Do it differently

* Update
2020-07-31 17:32:41 -04:00

32 lines
722 B
JavaScript
Executable File

var path = require('path');
var webpack = require('webpack');
var isProduction = process.env.NODE_ENV === 'production';
module.exports = {
mode: isProduction ? 'production' : 'development',
devtool: 'source-map',
entry: [
!isProduction && 'webpack-dev-server/client?http://localhost:3000',
!isProduction && 'webpack/hot/only-dev-server',
'./src/index'
].filter(Boolean),
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
include: path.join(__dirname, 'src')
}
]
}
};