Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jhnns/rewire-webpack

Dependency injection for webpack bundles
https://github.com/jhnns/rewire-webpack

Last synced: about 1 month ago
JSON representation

Dependency injection for webpack bundles

Awesome Lists containing this project

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)


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.


Contribution
------------

Thanks to [sokra](https://github.com/sokra) who wrote most of the code. :)


License
-------

[Unlicense](http://unlicense.org/)