rewire-webpack
rewire-webpack copied to clipboard
Dependency injection for webpack bundles
Hi: I'm trying to put together a react web app with Webpack + Karma that runs the Jasmine unit test spec with rewire-webpack. Whenever I tried running the Karma, the...
This is currently failing at compiler.parser.plugin because compiler.parser is undefined compiler.parser.plugin("var rewire", function () { return true; }); Browser console error: TypeError: Cannot read property 'plugin' of undefined at RewirePlugin.apply...
I currently have a project with enhanced-resolve v3.4.1 and it doesn't have `/lib/ModuleAliasPlugin.js`; this causes `RewirePlugin.js` to fail in line 48. See also: https://github.com/webpack/enhanced-resolve/tree/master/lib Additionally, in webpack the resolvers are...
My tests that were working with Webpack 1 and rewire now fail under webpack 2 beta. I receive the error: ``` C:\Users\sudsy\Development\gen3\PVL.Content\tests\node_modules\webpack\node_modules\enhanced-resolve\lib\Resolver.js:86 if(callback.stack) { ^ TypeError: Cannot read property 'stack'...
Hi, I was wondering if rewire-webpack can be used without webpack? I'm currently trying to use it inside one of the Cypress.io tests, but calling rewire("../../app.js") sadly returns undefined. I...
`beforeEach failed on setup: Unexpected token '-'. Expected ';' after variable declaration.@ 2 ms Source: eval@[native code] http://elementary.local/wp-content/plugins/elementary/tests/tests.bundle.js:96645:212 rewire@http://elementary.local/wp-content/plugins/elementary/tests/tests.bundle.js:80671:40 beforeEach@http://elementary.local/wp-content/plugins/elementary/tests/tests.bundle.js:96316:40 ` I get this error when loading by Qunit tests....
Hi, Firstly, I would like to thank you for very useful module. I'm using rewire with webpack bundle, but after upgrade webpack to version 1.4.13 I'm getting some warning messages...
## CommonJS syntax works Currently I have the following karma config: ``` javascript var webpack = require('webpack'); var RewirePlugin = require('rewire-webpack'); var rewirePlugin = new RewirePlugin(); module.exports = function (config)...
Hi, ``` var rewire = require('rewire-webpack'); var testStore = rewire('stores/test-store'); console.log("testStore: " + !!testStore); ``` I have a feeling that I am missing something obvious, but shouldn't testStore return true?...
the issue might be related to this bug but i'm not sure https://github.com/jhnns/rewire-webpack/issues/12 I'm running jasmine under Karma using webpack for packaging. When writing my specs in AMD notation, i...