webpack-production.config.js 759 B

123456789101112131415161718192021222324252627282930
  1. var webpack = require('webpack');
  2. module.exports = [
  3. require('./webpack-base.config.js')(true),
  4. {
  5. entry: './assets/server',
  6. output: {
  7. path: 'public',
  8. publicPath: '/assets/',
  9. filename: 'server.js'
  10. },
  11. resolve: {
  12. extensions: ['', '.js', '.jsx']
  13. },
  14. plugins: [
  15. new webpack.IgnorePlugin(/reqwest/),
  16. new webpack.optimize.UglifyJsPlugin(),
  17. new webpack.DefinePlugin({
  18. "process.env": {
  19. NODE_ENV: JSON.stringify("production")
  20. }
  21. })
  22. ],
  23. module: {
  24. loaders: [
  25. { test: /\.jsx$/, loader: 'jsx' }
  26. ]
  27. }
  28. }
  29. ]