browserify / browserify/bundle-collapser

Please, provide example of how to use with browserify

Open
#21 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
191
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I have code that look like this:

```
( ... )
var collapse = require('bundle-collapser');
( ... )
var b = browserify({
entries: admin_app_src,
cache: {},
packageCache: {},
plugin: [watchify]
}).transform('babelify', { "presets" : ["latest"] });
( ... )
function bundle() {
return b.bundle()
( ... )
.pipe( collapse() ) // <-- this does not work
( ... )
.pipe( source('build.js') )
( ... )
.pipe( buffer() )
( ... )
.pipe( uglify() )
( ... )
.pipe(gulp.dest('./assets/js'));
}
```
I can't seem to get bundle-collapser to work, no matter how I try to »implement« it – either as a plugin or in the pipeline.

Could you please provide an example of how to do this?

My problem seems to be how to pass the stream into the collapser ...

Also tried:
```
( ... )
}).transform('collapse', 'babelify', { "presets" : ["latest"] });
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.