Closed eek closed 7 years ago
Aye! This is a crappy issue because reflux
and reflux-core
got out of sync with each other over time, and when it happened nobody realized it was breaking changes happening. So now we've got conflicts that have no good resolution.
In the past reflux-core
exported in a way where what was being exported was an object which basically was Reflux...containing the reflux properties/methods.
Then some pushes where made that changed it exporting it as default
, without realizing that this changes how it exports itself to something more like an object that contains a default
property which then contains the actual Reflux properties/methods.
I'll look at solutions that might benefit both camps and see if we can resolve it. Give me a couple hours.
The easiest fix I could find, so that "both camps" are happy is actually explicitly create the default export as well...
So at the end of the Reflux index file, below module.exports = Reflux;
to also add module.exports.default = Reflux;
I know it's messy, but it works 😀
That's the general path of where I'm going, but I'm doing it inside reflux-core
(which is where the issue began) and doing it as a non-iterable property so that there's a little less messiness.
Working on getting it pushed into reflux-core
right now, then once its tests/build are all good will update reflux
itself to use that version of the core.
Awesome!
I tried the new version, it works! 😀 Great job! 😀
@eek - v5.0.3 should be good to go to work with either var Reflux = require('reflux');
style importing or import Reflux from 'reflux';
style importing.
Thanks, and thanks for finding/bringing up the issue.
@BryanGrezeszak unfortunately the last change in reflux-core made our website no longer usable.
We're doing:
I get
Cannot read property 'createActions' of undefined
, that's because Webpack compiles theimport Reflux from 'reflux'
into reflux.default where default does not exists, so createActions no longer exists.It's probably from the change in
reflux-core
, because of the removal of export default Reflux. Can we do anything about it? :D Like put it back? :))