You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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? I get 'false'. And I cannot set or get anything as 'testStore' always seems to be undefined.
other info:
no babel, no es6, just a simple test store (singleton).
rewire is installed, and !!rewire.apply returns true. ( so I am guessing rewire is setup correctly.)
using webpack.
using "require" in place of rewire returns 'true'.
I should also mention that I use AMD format for all my modules.
The text was updated successfully, but these errors were encountered:
Another query regarding matching view with the rewired store.
So here is my problem, I have a rewired 'flightStore' and a 'flightView' which has 'flightStore' as its dependency. How do I match the current rewired version of the flightStore in the flightView? Should I use rewire the view and use 'set' on it somehow to match the stores (or) the variables used in the view? Is there another simpler way to do this?
Hi,
I have a feeling that I am missing something obvious, but shouldn't testStore return true? I get 'false'. And I cannot set or get anything as 'testStore' always seems to be undefined.
other info:
The text was updated successfully, but these errors were encountered: