Socket
Book a DemoInstallSign in
Socket

bify-package-factor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

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">

FAQs

Package last updated on 06 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts