babel/minify

babili to transform entire bundle

Ouverte

#514 ouverte le 28 avr. 2017

 (0 commentaire) (0 réaction) (0 personne assignée)JavaScript (223 forks)batch import
help wanted

Métriques du dépôt

Stars
 (4 377 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

I have the following browserify fn call:

browserify({require: [
    'blah',
    'blah2',
    './bootstrap-datepicker'
]})
.require( './countdown', {expose: 'countdown'})
.transform(babelify.configure({ presets: ['es2015', 'babili'], sourceMaps: false }))
.bundle()
.pipe(jetpack.createWriteStream('build/vendor.js'))

For some reason it is only minifying the last library in the bundle. I've been trying to figure out how to run it on the whole bundle. Is there a way to do this given the current configuration? Or do I have to wait until the bundle is done and run babili on it separately? Would it be at all possible to provide an example of this working?

FYI - also posted the question here - http://stackoverflow.com/questions/43679538/minify-every-file-in-the-bundle-with-babili

Apologies if this is redundant, but I just can't seem to find any examples of what I need.

Guide contributeur