mirror of
https://github.com/fspc/workstand.git
synced 2025-04-04 10:03:22 -04:00
33 lines
821 B
JavaScript
33 lines
821 B
JavaScript
var webpack = require('webpack')
|
|
var BundleTracker = require('webpack-bundle-tracker')
|
|
|
|
var config = require('./webpack.base.config.js')
|
|
|
|
config.output.path = require('path').resolve('./assets/dist')
|
|
|
|
config.plugins = config.plugins.concat([
|
|
new BundleTracker({filename: './webpack-stats-prod.json'}),
|
|
|
|
// removes a lot of debugging code in React
|
|
new webpack.DefinePlugin({
|
|
'process.env': {
|
|
'NODE_ENV': JSON.stringify('production')
|
|
}}),
|
|
|
|
// keeps hashes consistent between compilations
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
|
|
// minifies your code
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
compressor: {
|
|
warnings: false
|
|
}
|
|
})
|
|
])
|
|
|
|
// Add a loader for JSX files
|
|
config.module.loaders.push(
|
|
{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel' }
|
|
)
|
|
|
|
module.exports = config |