Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserify-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-webpack-plugin

Simple, yet comprehensive webpack plugin to bundle almost any javascript/typescript project for modern browsers.

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

browserify-webpack-plugin 1

Simple, yet comprehensive webpack plugin to bundle almost any javascript/typescript project for modern browsers.

Level of support is the union of both Webpack2 and Browserify3 shims, in addition to the following features:

  • Multi-threaded in-memory filesystem through wasabio.
  • Network-less in-browser http server through fakettp.
  • Dockerized and virtual child processes with brocess.

This plugin also takes care of selectively applying these shims and properly initialize their respective libraries.

Usage

This plugin uses Webpack's "Extends" feature in its configuration. This allows you more flexibility in how you configure your project.

# in your project directory
npm install --save-dev browserify-webpack-plugin
// webpack.config.js
const path = require("path");
module.exports = {
  extends: require.resolve("browserify-webpack-plugin"),
  mode: "development",
  entry: "./index.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "bundle.js",
  },
};

The plugin accepts a few command line arguments:

  • --env include**="<pathOrGlob>" where ** may be optionally repeated with different values to form an array and self document what is being included next to the bundle.
  • --env exclude**="<pathOrGlob>" where ** may be optionally substituted just like above, these patterns will be excluded from the emitted memory asset.
  • --env memory="<unique>" where <unique> is mem.zip by default. This is wasabio's starter memory archive.
  • --env listen="<address>" where <address> is localhost:8080 by default. This is fakettp's starter address.
  • --env docker="<image>" where <image> is Latest Debian Slim by default. This is brocess's starter container.

Example invocation in your repository after extending this package in your webpack.config.js:

# emits "mem.zip" in the output directory which includes the following globs in wasabio's memory:
webpack --env includeSrc='mods/*' --env includeIndex='index.js' --env exclude='tty.ts'

Footnotes

  1. This project is not associated with the original Browserify project.

  2. Webpack's documented resolve fallbacks

  3. Browserify's documented builtin transforms

FAQs

Package last updated on 09 Apr 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc