UNPKG

579 BJavaScriptView Raw
1var path = require("path");
2var srcDir = './src'
3gulp.task('webpackjs', function () {
4 webpack(require('./webpack.config.js'))
5 .pipe(uglify({
6 //mangle: true,//类型:Boolean 默认:true 是否修改变量名
7 mangle: {except: ['require' ,'exports' ,'module']},//排除混淆关键字
8 mangle: true,//类型:Boolean 默认:true 是否修改变量名
9 compress: false,//类型:Boolean 默认:true 是否完全压缩
10 preserveComments: 'all' //保留所有注释
11 }))
12 .pipe(gulp.dest('./build/js'));
13});