在我的远程服务器(Ubuntu 14.04 x64)上,每当我尝试uglify我的包时,该过程只返回"Killed".当我不丑化时,它就没事了.
有没有人碰到这个?当我在我的本地Mac上这样做时,它很好(虽然我只是测试了它,花了1.4分钟).
这是我的webpack.config:
var webpack = require('webpack');
function makeConfig(opts) {
var config = {
entry: {
app: ['./public/scripts/main.js'],
vendor: ['lodash', 'react', 'react/lib/ReactCSSTransitionGroup', 'react-router', 'reqwest', 'd3']
},
stats: {
colors: true,
reasons: true
},
output: {
devtool: (opts.env === 'dev' ? '#eval-source-map' : ''),
path: 'dist/scripts',
filename: '[name].bundle.js'
},
plugins: [
new webpack.DefinePlugin({
ENV: opts.env
}),
new webpack.optimize.CommonsChunkPlugin('vendor.bundle.js')
],
module: {
loaders: [
{ test: /\.jsx?$/, loader: 'jsx-loader' }
]
}
};
if(opts.env === 'prod') {
config.plugins.push(
new webpack.optimize.UglifyJsPlugin(), …Run Code Online (Sandbox Code Playgroud)