jhnns / rewire-webpack

Dependency injection for webpack bundles
The Unlicense
121 stars 20 forks source link

Doesn't work in Karma #14

Closed volkanunsal closed 8 years ago

volkanunsal commented 9 years ago

I'm trying to integrate rewire into Karma, and it keeps failing me.

ReferenceError: Can't find variable: rewire in .../assets/karma.tests.js (line 147)

Why? I don't know. Here is my configuration files:

// webpack.config.js
var RewirePlugin = require('rewire-webpack');
config.plugins.push(new RewirePlugin());
// karma.config.js
plugins: [
      'rewire-webpack'
]

I did everything right, I think. But still doesn't work...

munnerz commented 8 years ago

Did you ever come to a resolution with this? I'm currently having the same issue.