We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current Behavior
the default behaviour of using
import { Observable } from "rxjs";
it will be using the source file in ./node_modules/rxjs/_esm5/index.js because of the module defined in ./node_modules/rxjs/package.json
./node_modules/rxjs/_esm5/index.js
module
./node_modules/rxjs/package.json
but if we are using some other stuffs like
import { fromFetch } from "rxjs/fetch";
it will be using the source file in ./node_modules/rxjs/fetch/index.js
./node_modules/rxjs/fetch/index.js
this is causing a lot of bugs which I filed it here #4820
I have to use
import { fromFetch } from "rxjs/_esm5/fetch";
then everything works fine
Reproduction https://github.com/kambing86/test-from-fetch fix repo https://github.com/kambing86/test-from-fetch/tree/fix/import-fromFetch
Expected behavior should be using just one type of source?
Environment
The text was updated successfully, but these errors were encountered:
it seems like using rxjs/operators is fine, most likely because they are just pure functions without state
rxjs/operators
import { finalize, mergeMap, share } from "rxjs/operators";
but fromFetch is returning the Observable class which is stateful, and this causes a lot of weird issues
fromFetch
Observable
Sorry, something went wrong.
@benlesh It seems likely that the problem is related to fetch not being included here:
fetch
rxjs/.make-packages.js
Lines 135 to 140 in 3881723
thanks @cartant for pointing out the root cause, I tried to fix it in my local and it works
create a PR for this #5001
No branches or pull requests
Bug Report
Current Behavior
the default behaviour of using
it will be using the source file in
./node_modules/rxjs/_esm5/index.js
because of themodule
defined in./node_modules/rxjs/package.json
but if we are using some other stuffs like
it will be using the source file in
./node_modules/rxjs/fetch/index.js
this is causing a lot of bugs which I filed it here #4820
I have to use
then everything works fine
Reproduction
https://github.com/kambing86/test-from-fetch
fix repo https://github.com/kambing86/test-from-fetch/tree/fix/import-fromFetch
Expected behavior
should be using just one type of source?
Environment
The text was updated successfully, but these errors were encountered: