2015-06-10 5 views
8

Auf meinem Remote-Server (Ubuntu 14.04 x64), wenn ich versuche, meine Bundles zu egglify, der Prozess kehrt einfach "Killed". Wenn ich mich nicht blamiere, ist es in Ordnung.Webpack Uglify-Plugin gibt "Killed" auf Ubuntu zurück

Hat jemand in das hineingeraten? Wenn ich es auf meinem lokalen Mac mache, ist es in Ordnung (obwohl ich es gerade getestet habe und es 1,4 Minuten dauerte).

Das ist mein webpack.config ist:

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(), 
      new webpack.optimize.DedupePlugin() 
     ); 
    } 

    return config; 
} 

module.exports = makeConfig; 

und es durch schluck wie so genannt:

gulp.task('webpack', ['cleanScripts'], function(done) { 
    webpack(webpackConfig, function(err, stats) { 
     if(err) { 
      console.error(err); 
      throw new gutil.PluginError('webpack', err);  
     } 
     else { 
      done(); 
     } 
    }); 
}); 
+0

Same mit AWS kostenlos Tier micro.t2 – Green

Antwort

1

ich hatte das gleiche Problem auf digitalen Ozean vm, stellte sich heraus, kein Swap war konfiguriert, so dass es gerade keinen Speicher mehr hat.