fix(ESM): Add operators/package.json for ESM support, fixes #3227#3356
fix(ESM): Add operators/package.json for ESM support, fixes #3227#3356benlesh merged 1 commit intoReactiveX:masterfrom
Conversation
Generated by 🚫 dangerJS |
| typings: './index.d.ts' | ||
| typings: './index.d.ts', | ||
| module: './_esm5/index.js', | ||
| es2015: './_esm2015/index.js' |
There was a problem hiding this comment.
It's hard to keep everything straight, but AFAICT this also makes the whole path-mappings.js thing unnecessary if you're using a newish version of webpack or rollup.
Would be cool to still include instructions (and maybe path-mappings still) for people who are stuck on older build pipelines.
There was a problem hiding this comment.
Yes, if users only import from "rxjs" and "rxjs/operators", importing "rxjs/index" or (more realistically) "rxjs/Rx" would not be mapped.
|
This says "fixes #3227", but it doesn't handle webpack native tree-shaking? I'd have to check the quality difference between having |
Can you clarify why it does not? (I tested this btw) |
|
See the example |
|
@simonbuchan oh yeah |
jasonaden
left a comment
There was a problem hiding this comment.
This looks correct.
I think we also need a similar package.json file in ajax, testing, and websocket, right?
|
@jayphelps Probably! But #3227 reads to me an umbrella issue of "make it just work™". @jasonaden Is |
Ohhh right! Thanks for catching that! @simonbuchan sorry for the confusion! My primary intention with that ticket was how to prevent two copies of RxJS. 🕺 |
|
@jasonaden I've updated to include package.json's for ajax/websocket/testing |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
See #3227
I didn't do anything for
@reactivex/rxjspackage because I'm hopeful for its elimination (#2916) and I'm not entirely sure how it works lol.