1.0.7 • Published 5 years ago

bify-package-factor v1.0.7

Weekly downloads
78
License
MIT
Repository
github
Last release
5 years ago

bify-package-factor

Browserify plugin that creates bundles factored at package-level granularity. The browserify stream output becomes a vinyl-source-stream, emitting one vinyl file metadata object per bundle.

use

This will generate three bundles. One bundle for packages unique to each of the entrypoints, and one common bundle for packages that are used by both.

const bundler = browserify(['entry1.js', 'entry2.js'])
  .plugin('bify-package-factor')

bundler.bundle()
  .pipe(gulp.dest('./bundles/'))

You can then import the common bundle as well as your entry-specific bundle.

<title>page one</title>
<script src="./bundles/common.js">
<script src="./bundles/entry1.js">
<title>page two</title>
<script src="./bundles/common.js">
<script src="./bundles/entry2.js">
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago