• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    JavaScript
  • License
    The Unlicense
  • Created over 11 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dependency injection for webpack bundles

rewire-webpack

Use rewire in webpack bundles.

Dependency Status

This is a plugin that enables rewire for client-side bundles generated by webpack.

npm status


Installation

npm install rewire-webpack

and then add the RewirePlugin to the webpack config:

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 who wrote most of the code. :)


License

Unlicense

More Repositories

1

rewire

Easy monkey-patching for node.js unit tests
JavaScript
3,078
star
2

bumpy-road-to-universal-javascript

Example repository for my talk "The bumpy road to Universal JavaScript"
JavaScript
33
star
3

spa-vs-universal

Real-world example implementation of a blog using a SPA and a universal architecture. Demonstrates server-side rendering combined with code-splitting.
JavaScript
31
star
4

toSrc

Turns every JavaScript object or primitive into valid source code that can be evaled again.
JavaScript
19
star
5

webpack-config-tips

Not so secret tips and examples on how to write good webpack configs.
HTML
19
star
6

popular-javascript-projects

Scripts that I have used to retrieve and process data about JavaScript projects from Github, npm, StackOverflow etc.
JavaScript
16
star
7

JSONPoo

Like JSONP, but better
9
star
8

webpack-browser-benchmark

An I/O independent webpack build for browser benchmarks
JavaScript
4
star
9

webpack-extract-index-html

Example project that demonstrates how the ExtractTextWebpackPlugin can be used to generate an index.html
JavaScript
4
star
10

slides-frontend-optimization

HTML
2
star
11

browserify-bypass

A node.js browserify middleware to declare alternative requires for the browser
2
star
12

hello-rust

Rust example project that can be published on NPM as WebAssembly module
Rust
2
star
13

webpack-hash-test

This repository can be used to check if and under what circumstances webpack may produce different hashes. See https://github.com/webpack/webpack/issues/1479
JavaScript
2
star
14

webpack-broken-source-maps

This repository demonstrates a common problem where webpack loaders are responsible for broken source maps.
JavaScript
2
star
15

woerdl

JavaScript
1
star
16

visual-bank-account

Visualizes earnings and spendings of your bank account
JavaScript
1
star
17

nuxt-pwa-build-perf-demo

A repository to demonstrate a problem with the Nuxt PWA plugin that slows down the build
Vue
1
star
18

haskell-experiments

Haskell experiments
Haskell
1
star
19

worker-message-performance

Performance test of message passing between the main thread and a service- or web-worker.
HTML
1
star
20

premailer

Simple API-wrapper for http://premailer.dialect.ca to sanitize HTML-mails
1
star
21

prisma-bug-repo

A repository for reproducing Prisma bugs
1
star
22

ts-node-tests

1
star