Files
redux-form/examples/material-ui/webpack.config.prod.js

52 lines
999 B
JavaScript

var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: [
'babel-polyfill',
'./src/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/dist/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
],
resolve: {
modulesDirectories: [
'src',
'node_modules'
],
extensions: [ '', '.json', '.js' ]
},
module: {
loaders: [
{
test: /\.js$/,
loaders: [ 'babel' ],
include: path.join(__dirname, 'src')
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.md/,
loaders: [ "html-loader", "markdown-loader" ]
}
]
}
};