redux-devtools/packages/react-json-tree/examples/webpack.config.js

30 lines
718 B
JavaScript
Raw Normal View History

var path = require('path');
var webpack = require('webpack');
var isProduction = process.env.NODE_ENV === 'production';
module.exports = {
mode: isProduction ? 'production' : 'development',
2020-08-01 22:30:39 +03:00
devtool: 'eval-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: [
2019-01-10 21:51:14 +03:00
{
test: /\.js$/,
loader: 'babel-loader',
2019-01-10 21:51:14 +03:00
include: path.join(__dirname, 'src')
}
]
}
};