Open bradleyayers opened 9 years ago
I also tried building it with browserify, but get the same problem when using the build version in the browser.
I can work around it by just use delorean.js
directly (without requirements.js
) from the npm distribution (because it's not yet browserified). I then define my own module delorean.flux
that does the DeLorean.Flux.define
setup:
define(["delorean", "eventemitter2", "es6-promise"], function (delorean, EventEmitter2, Promise) {
delorean.Flux.define("EventEmitter", EventEmitter2);
delorean.Flux.define("Promise", Promise);
return delorean.Flux;
});
The bower distributed delorean does not work with Require.js
First problem is
require('events').EventEmitter
:But the module is defined as:
So I think in the injector it should just be
require('event')
right?Second problem is in the injector:
But when used in the browser with Require.js, DeLorean is
undefined
because: