question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UMD and/or FESM bundles - now tractable with 6.0.0

See original GitHub issue

RxJS version:

6

Expected behavior:

Ship a small number of UMD and/or FESM bundles, one for each of the small number of import targets under RxJS 6.

Actual behavior:

For the moment (v6 beta) it looks like there is just a single UMD bundle provided, which can’t support multiple important targets. Please many small files, suitable for application-level bundling.

Additional information:

This thing has been discussed in the past, but there was never a tenable solution (other than SystemJS bundle format, which has less wide use) to ship a small number of bundles that contain the RxJSs code, while still supporting:

import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { map } from 'rxjs/operator/map';

(i.e., how things were through version 5)

But with the new, much smaller number of import targets, for example see this in the current README:

import { Observable, Subject, ReplaySubject, from, of, range } from 'rxjs';
import { map, filter, switchMap } from 'rxjs/operators';

It is now possible to ship a small number of UMD or FESM bundles, one for each of the handful of imports (rxjs, rxjs/operators, etc.).

This would take care of use cases for those of us with use cases that consume RxJS directly from something like a CDN, without having to create and publish such a bundle ourselves (as me and a number of others had done historically with SystemJS).

/cc pleading my case to @benlesh @IgorMinar etc 😉

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
stevebluecommented, Apr 2, 2018

If this is all that is required for a system.config.json then I am OK with the current state of the build. Do you see a problem with this @kylecordes ? This is a huge improvement from 5.5 IMHO.

    map: {
      'rxjs': 'lib:rxjs'
    },
    packages: {
      'rxjs/ajax': { main: 'index.js', defaultExtension: 'js' },
      'rxjs/operators': { main: 'index.js', defaultExtension: 'js' },
      'rxjs/testing': { main: 'index.js', defaultExtension: 'js' },
      'rxjs/websocket': { main: 'index.js', defaultExtension: 'js' },
      'rxjs': { main: 'index.js', defaultExtension: 'js' }
    }
2reactions
stevebluecommented, Mar 26, 2018

+1 for not wanting to bundle rxjs just for my development environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Rxjs umd bundles - angular - Stack Overflow
It is now possible to ship a small number of UMD or FESM bundles, one for each of the handful of imports (rxjs,...
Read more >
Angular Package Format v10 - Google Docs
Still, others might consume packages in Node or maybe in the browser as a UMD bundle or through global variable access. The Angular...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found