1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

use UglifyJsPlugin

This commit is contained in:
nkzawa 2016-10-09 21:45:26 +09:00
parent a8c6b9e57a
commit f9eaf8db3b
2 changed files with 2 additions and 4 deletions

View file

@ -2,7 +2,6 @@ const gulp = require('gulp')
const babel = require('gulp-babel') const babel = require('gulp-babel')
const cache = require('gulp-cached') const cache = require('gulp-cached')
const notify_ = require('gulp-notify') const notify_ = require('gulp-notify')
const uglify = require('gulp-uglify')
const webpack = require('webpack-stream') const webpack = require('webpack-stream')
const del = require('del') const del = require('del')
@ -85,10 +84,10 @@ gulp.task('build-release-client', ['compile-lib', 'compile-client'], () => {
'process.env': { 'process.env': {
NODE_ENV: JSON.stringify('production') NODE_ENV: JSON.stringify('production')
} }
}) }),
new webpack.webpack.optimize.UglifyJsPlugin()
] ]
})) }))
.pipe(uglify({ preserveComments: 'license' }))
.pipe(gulp.dest('dist/client')) .pipe(gulp.dest('dist/client'))
.pipe(notify('Built release client')) .pipe(notify('Built release client'))
}) })

View file

@ -47,7 +47,6 @@
"gulp-babel": "6.1.2", "gulp-babel": "6.1.2",
"gulp-cached": "1.1.0", "gulp-cached": "1.1.0",
"gulp-notify": "2.2.0", "gulp-notify": "2.2.0",
"gulp-uglify": "2.0.0",
"webpack-stream": "3.2.0" "webpack-stream": "3.2.0"
}, },
"license": "MIT" "license": "MIT"