-
Notifications
You must be signed in to change notification settings - Fork 2.1k
RxJS throws errors when building with WebPack - UMD Header Bug? #832
Comments
@sdesai could you submit a PR with your proposed change? |
I can, although my proposed change may break something else (The Will submit it, but again not sure what impact is has on all potential use cases/builds. |
The following error was also received when compiling with webpack.
I fixed it with the following modifications: define(['rx.binding', 'exports'] -> define(['./rx.binding', 'exports'] dist/rx.testing.js define(['rx.virtualtime', 'exports'] -> define(['./rx.virtualtime', 'exports'] Im not confident enough with RxJS just yet to create a PR with this. Could there be any side-effects to this? |
@mattpodwysocki - Has this been pushed to npm yet? Just tried retesting my original repro case (above) and it's still failing, but it's pulling down rx@3.0.1, and the dist in that version doesn't seem to have the change (I checked node_modules/rx/dist/rx.aggregates.js and it's still define['rx']). Were you waiting for the testing feedback before publishing? If so, I can change the repro case to pull in Rx from github (same for falcor) |
The basic repro I had now passes, if I pull in the lastest 'master', so looks good there. I'll try it out with Falcor and update. |
A webpack build works fine with the Falcor demo server too (https://github.com/netflix/falcor-express-demo) without the special webpack.config.js (containing the alias workaround). |
@sdesai ok, great, then I will get it out now. |
When using RxJS with WebPack, apps cannot
require('rx/dist/rx')
along with incremental bundles, such asrx/dist/rx.aggregates
, due to the UMD header added torx/dist/rx.aggregates
et al pulling in and modifyingrx/dist/rx.all
as a dependency instead ofrx/dist/rx
.Full details, and repo case here: https://github.com/sdesai/rxjs-webpack-test
NOTE: I realize there have been other issues and threads around this issue, but I don't believe the root cause has been fixed (outlined in the link above).
The text was updated successfully, but these errors were encountered: