-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(ESM): Add operators/package.json for ESM support, fixes #3227 #3356
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
See #3227
I didn't do anything for
@reactivex/rxjs
package because I'm hopeful for its elimination (#2916) and I'm not entirely sure how it works lol.