# browserify-bypass

> browserify middleware to declare alternative requires for the browser

Latest version **0.1.0** (published 2012-06-18) · 0 weekly downloads

## Install

```sh
npm install browserify-bypass
pnpm add browserify-bypass
yarn add browserify-bypass
bun add browserify-bypass
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2012-06-18 |
| First published | 2012-06-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | <=0.8.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Johannes Ewald |
| Maintainers | jhnns |
| Keywords | browserify, middleware, alternative, conditional, require, browser |

## Links

- npm: https://www.npmjs.com/package/browserify-bypass
- npm.io page: https://npm.io/package/browserify-bypass

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2012-06-18

## README

browserify-bypass
=================

A node.js [browserify](https://github.com/substack/node-browserify) middleware to declare alternative requires for
the browser.

<br />

Installation
------------

`npm install browserify-bypass`

Example
--------

To declare an alternative require for the browser write `// @browser ./path/to/browserModule.js` one line above the
 require statement:

```javascript

// @browser ./browserModule.js
var myModule = require("./nodeModule.js"),
// @browser ./anotherBrowserModule.js
    anotherModule = require("./anotherNodeModule.js");
```

To generate the browserified module just do this:

```javascript

var b = require("browserify");

b(); // init browserify with default options
b.use(require("browserify-bypass"));
b.require("./testModule.js");
```

The browserified module will now look like this:

```javascript

var myModule = require("./browserModule.js"),
    anotherModule = require("./anotherBrowserModule.js");
```

---
_Source: https://npm.io/package/browserify-bypass · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
