mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-13 21:26:44 +03:00
b80cc9e5b9
* Merge react-json-tree from alexkuz/react-json-tree * Npm package config * Add credits * Stick `eslint-plugin-react` to `7.4.0` till change deprecated `componentWillReceiveProps`
52 lines
1.4 KiB
JavaScript
Executable File
52 lines
1.4 KiB
JavaScript
Executable File
var path = require('path');
|
|
var webpack = require('webpack');
|
|
|
|
var isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
module.exports = {
|
|
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.DefinePlugin({
|
|
'process.env': {
|
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
|
}
|
|
}),
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
isProduction && new webpack.optimize.UglifyJsPlugin({
|
|
compress: { warnings: false },
|
|
output: { comments: false },
|
|
sourceMap: true
|
|
})
|
|
].filter(Boolean),
|
|
resolve: {
|
|
alias: {
|
|
'react-json-tree/lib': path.join(__dirname, '..', 'src'),
|
|
'react-json-tree': path.join(__dirname, '..', 'src'),
|
|
'react': path.join(__dirname, 'node_modules', 'react')
|
|
},
|
|
extensions: ['.js']
|
|
},
|
|
module: {
|
|
loaders: [{
|
|
test: /\.js$/,
|
|
loaders: ['babel-loader'].filter(Boolean),
|
|
include: path.join(__dirname, 'src')
|
|
}, {
|
|
test: /\.js$/,
|
|
loaders: ['babel-loader'].filter(Boolean),
|
|
include: path.join(__dirname, '..', 'src')
|
|
}]
|
|
}
|
|
};
|