Skip to content
New issue

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

Rxjs has no default export, installation example does not work. #3827

Closed
1 of 5 tasks
RobbyDmz opened this issue Jun 11, 2018 · 2 comments
Closed
1 of 5 tasks

Rxjs has no default export, installation example does not work. #3827

RobbyDmz opened this issue Jun 11, 2018 · 2 comments
Labels
bug Confirmed bug docs Issues and PRs related to documentation

Comments

@RobbyDmz
Copy link

RobbyDmz commented Jun 11, 2018

Documentation Related To Component:

Package

Please check those that apply

  • typo
  • documentation doesn't exist
  • documentation needs clarification
  • error(s) in example
  • needs example

Description Of The Issue

The documented method to import the entire library does not work with webpack/ES6 modules.
From the current docs:

import Rx from 'rxjs/Rx';
Rx.Observable.of(1, 2, 3);

As the Rxjs/Rx package has no default export defined this can't work.
Either the documentation should be updated or the package should have a default export which would classify this as a bug report.

Possible Solution

Update documentation to

import * as Rx from 'rxjs/Rx'
Rx.Observable.of(1, 2, 3);

Environment

  • Runtime: node v8.11.1
  • RxJS version: 6.2.0
  • Tested with react-create-app's defaults
  • Tested with own minimal webpack v4.12.0 + ts-loader v4.4.1 setup
@RobbyDmz RobbyDmz changed the title Rxjs has no default export Rxjs has no default export, installation example does not work. Jun 11, 2018
@benlesh benlesh added priority: high docs Issues and PRs related to documentation bug Confirmed bug labels Jun 11, 2018
@r3h0
Copy link

r3h0 commented Jun 19, 2018

I believe the preferred way is now this:

import { of } from 'rxjs';
of(1, 2, 3);

benlesh pushed a commit that referenced this issue Aug 29, 2018
…4063)

* docs(installation): update imports to use rxjs 6+ convention (#3827)

* docs(installation): add usage for globally imported bundle(#3943)

* docs(installation): remove patching and add url to pipeable to doco(#3827)
@cartant
Copy link
Collaborator

cartant commented Jan 28, 2019

Closing this as the associated PR has been merged.

@cartant cartant closed this as completed Jan 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug docs Issues and PRs related to documentation
Projects
None yet
Development

No branches or pull requests

4 participants