Repository URL to install this package:
|
Version:
0.2.0 ▾
|
admin
/
webpack.config.prod.js
|
|---|
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
path.resolve(__dirname, 'src/jsx/App')
],
output: {
path: path.resolve(__dirname, 'build'),
publicPath: '/dist/',
filename: 'app.bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
],
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot']
}, {
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'react'],
compact: false
}
}, {
test: /\.css$/,
loader: "style-loader!css-loader"
}, {
test: /\.woff|\.woff2|\.svg|.eot|\.ttf/,
loader: 'url?prefix=font/&limit=10000'
}]
}
};