Open nickleefly opened 7 years ago
Is there anything I'm doing wrong?
The output from below is 343K
343K
browserify -t [ babelify --presets [ es2015 react ] ] src/index.js \ -g [ envify --NODE_ENV production ] \ -g uglifyify -p bundle-collapser/plugin \ | uglifyjs -cm > public/build/app.js
is smaller than the one below is439K build.js
439K
var browserify = require('browserify') var envify = require('envify/custom') browserify('src/index.js') .transform('babelify', {presets: ['es2015', 'react']}) .transform(envify({NODE_ENV: 'production'})) .transform({ global: true, mangle: true, sourcemap: false, compress: { sequences: true, dead_code: true, booleans: true } }, 'uglifyify') .plugin(require('bundle-collapser/plugin')) .bundle() .pipe(process.stdout)
then node build.js | uglifyjs -cm > public/build/app.js
node build.js | uglifyjs -cm > public/build/app.js
Maybe give https://github.com/hughsk/uglifyify/pull/62 a go?
Is there anything I'm doing wrong?
The output from below is
343K
is smaller than the one below is
439K
build.jsthen
node build.js | uglifyjs -cm > public/build/app.js