# rewire-webpack

> Dependency injection for webpack bundles

Latest version **1.0.1** (published 2015-11-15) · 0 weekly downloads

## Install

```sh
npm install rewire-webpack
pnpm add rewire-webpack
yarn add rewire-webpack
bun add rewire-webpack
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-11-15 |
| First published | 2013-03-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 119 |
| Author | Johannes Ewald |
| Maintainers | jhnns, peerigon |
| Keywords | dependency, injection, mock, unit, test, leak, webpack, browser, inspect |

## Links

- npm: https://www.npmjs.com/package/rewire-webpack
- Repository: https://github.com/jhnns/rewire-webpack
- Issues: https://github.com/jhnns/rewire-webpack/issues
- npm.io page: https://npm.io/package/rewire-webpack

## Dependencies (2)

- [webpack](https://npm.io/package/webpack.md) ^1.12.6
- [enhanced-resolve](https://npm.io/package/enhanced-resolve.md) ^0.9.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-11-15
- 1.0.0 — 2014-11-04
- 0.2.0 — 2014-07-11
- 0.1.0 — 2014-04-06
- 0.0.2 — 2013-10-04
- 0.0.1 — 2013-10-03
- 0.0.0 — 2013-03-13

## README

rewire-webpack
=====
**Use [rewire](https://github.com/jhnns/rewire) in webpack bundles**.

[![Dependency Status](http://david-dm.org/jhnns/rewire-webpack/status.svg)](http://david-dm.org/jhnns/rewire-webpack)

This is a plugin that enables [rewire](https://github.com/jhnns/rewire) for client-side bundles generated by [webpack](https://github.com/webpack/webpack).

[![npm status](https://nodei.co/npm/rewire-webpack.svg?downloads=true&stars=true)](https://npmjs.org/package/rewire-webpack)

<br />

Installation
------------

`npm install rewire-webpack`

and then add the RewirePlugin to the webpack config:

```javascript
var RewirePlugin = require("rewire-webpack");
var webpackConfig = {
    plugins: [
        new RewirePlugin()
    ]
};
```

After that you can use `rewire()` in your client-side bundles as usual.

<br />

Contribution
------------

Thanks to [sokra](https://github.com/sokra) who wrote most of the code. :)

<br />

License
-------

[Unlicense](http://unlicense.org/)

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