Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. webpack --optimize-minimize --define process.env.NODE_ENV="'production'"
  2.  
  3. var gulp = require('gulp');
  4. var webpackStream = require('webpack-stream');
  5. var webpack2 = require('webpack');
  6.  
  7. gulp.task('default', function() {
  8. var options = {
  9. plugins: [
  10. new webpack2.DefinePlugin({
  11. 'process.env': { 'NODE_ENV': "'production'" }
  12. }),
  13. new webpack2.optimize.UglifyJsPlugin()
  14. ]
  15. };
  16. return gulp.src('src/entry.js')
  17. .pipe(webpackStream(options, webpack2))
  18. .pipe(gulp.dest('dist/'));
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement