mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 11:03:57 +03:00
c09c9a4e13
* Merge map2tree from romseguy/map2tree * Dependences and npm package config * Add credits
40 lines
689 B
JavaScript
Executable File
40 lines
689 B
JavaScript
Executable File
'use strict';
|
|
|
|
var webpack = require('webpack');
|
|
|
|
var plugins = [
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
new webpack.DefinePlugin({
|
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
|
|
})
|
|
];
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
plugins.push(
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
compressor: {
|
|
screw_ie8: true,
|
|
warnings: false
|
|
}
|
|
})
|
|
);
|
|
}
|
|
|
|
module.exports = {
|
|
module: {
|
|
loaders: [{
|
|
test: /\.js$/,
|
|
loaders: ['babel-loader'],
|
|
exclude: /node_modules/
|
|
}]
|
|
},
|
|
output: {
|
|
library: 'map2tree',
|
|
libraryTarget: 'umd'
|
|
},
|
|
plugins: plugins,
|
|
resolve: {
|
|
extensions: ['', '.js']
|
|
}
|
|
};
|